1 package org.simantics.utils;
5 public interface TempFiles {
8 * @return the directory containing all temporary file names generated by
11 public File getRoot();
15 * possible directory under {@link #getRoot()}
17 * suffix of generated temporary file name without the '.'
18 * character separating the random start and the extension
20 * @return temporary file with a random name that ends in
21 * <code>suffix</code> and is contained by a directory under
22 * {@link #getRoot()} with the name <code>directory</code>
24 public File getTempfile(String directory, String suffix);
27 * Create a new TempFiles instance that will produce temporary file names in
28 * a specified subdirectory of this TempFiles location.
31 * @return the sub-TempFiles instance
34 public TempFiles subdirectory(String directory);