--- /dev/null
+package org.simantics.utils;\r
+\r
+import java.io.File;\r
+\r
+public interface TempFiles {\r
+\r
+ /**\r
+ * @return the directory containing all temporary file names generated by\r
+ * this instance.\r
+ */\r
+ public File getRoot();\r
+\r
+ /**\r
+ * @param directory\r
+ * possible directory under {@link #getRoot()}\r
+ * @param suffix\r
+ * suffix of generated temporary file name without the '.'\r
+ * character separating the random start and the extension\r
+ * (suffix)\r
+ * @return temporary file with a random name that ends in\r
+ * <code>suffix</code> and is contained by a directory under\r
+ * {@link #getRoot()} with the name <code>directory</code>\r
+ */\r
+ public File getTempfile(String directory, String suffix);\r
+\r
+ /**\r
+ * Create a new TempFiles instance that will produce temporary file names in\r
+ * a specified subdirectory of this TempFiles location.\r
+ * \r
+ * @param directory\r
+ * @return the sub-TempFiles instance\r
+ * @since 1.16\r
+ */\r
+ public TempFiles subdirectory(String directory);\r
+\r
+}\r