]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.utils/src/org/simantics/utils/TempFiles.java
Changing existing log4j logging to use slf4j
[simantics/platform.git] / bundles / org.simantics.utils / src / org / simantics / utils / TempFiles.java
1 package org.simantics.utils;\r
2 \r
3 import java.io.File;\r
4 \r
5 public interface TempFiles {\r
6 \r
7     /**\r
8      * @return the directory containing all temporary file names generated by\r
9      *         this instance.\r
10      */\r
11     public File getRoot();\r
12 \r
13     /**\r
14      * @param directory\r
15      *            possible directory under {@link #getRoot()}\r
16      * @param suffix\r
17      *            suffix of generated temporary file name without the '.'\r
18      *            character separating the random start and the extension\r
19      *            (suffix)\r
20      * @return temporary file with a random name that ends in\r
21      *         <code>suffix</code> and is contained by a directory under\r
22      *         {@link #getRoot()} with the name <code>directory</code>\r
23      */\r
24     public File getTempfile(String directory, String suffix);\r
25 \r
26     /**\r
27      * Create a new TempFiles instance that will produce temporary file names in\r
28      * a specified subdirectory of this TempFiles location.\r
29      * \r
30      * @param directory\r
31      * @return the sub-TempFiles instance\r
32      * @since 1.16\r
33      */\r
34     public TempFiles subdirectory(String directory);\r
35 \r
36 }\r