import be.nikiroo.fanfix.library.RemoteLibrary;
import be.nikiroo.utils.Cache;
import be.nikiroo.utils.IOUtils;
+import be.nikiroo.utils.TempFiles;
import be.nikiroo.utils.TraceHandler;
import be.nikiroo.utils.resources.Bundles;
private static File remoteDir;
private static String configDir;
private static TraceHandler tracer;
+ private static TempFiles tempFiles;
static {
// Before we can configure it:
+ coverDir));
coverDir = null;
}
+
+ try {
+ tempFiles = new TempFiles("fanfix");
+ } catch (IOException e) {
+ tracer.error(new IOException("Cannot create temporary directory", e));
+ }
}
/**
}
}
+ /**
+ * The facility to use temporary files in this program.
+ * <p>
+ * <b>MUST</b> be closed at end of program.
+ *
+ * @return the facility
+ */
+ public static TempFiles getTempFiles() {
+ return tempFiles;
+ }
+
/**
* The configuration directory (will check, in order of preference,
* {@link Bundles#getDirectory()}, the system properties, the environment