+
+ /**
+ * Change the temporary root directory used by the program.
+ * <p>
+ * Caution: the directory will be <b>owned</b> by the system, all its files
+ * now belong to us (and will most probably be deleted).
+ * <p>
+ * Note: it may take some time until the new temporary root is used, we
+ * first need to make sure the previous one is not used anymore (i.e., we
+ * must reach a point where no unclosed {@link Image} remains in memory) to
+ * switch the temporary root.
+ *
+ * @param root
+ * the new temporary root, which will be <b>owned</b> by the
+ * system
+ */
+ public static void setTemporaryFilesRoot(File root) {
+ tempRoot = root;
+ }