Package de.xima.fc.common.file
Class TempFileCreators
- java.lang.Object
-
- de.xima.fc.common.file.TempFileCreators
-
public final class TempFileCreators extends Object
Factory for temporary files creators. A temporary file creator is a supplier that, when called, creates a temporary file and returns its path.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description TempFileCreators()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ISerializableThrowingSupplier<Path>
newTempFileCreator()
Gets a creators that creates temporary files in the default temporary directory.static ISerializableThrowingSupplier<Path>
newTempFileCreator(String folder)
Gets a creators that creates temporary files in the given folder.static ISerializableThrowingSupplier<Path>
newTempFileCreator(String prefix, String suffix)
Gets a creators that creates temporary files in the default temporary directory, but with the given prefix and suffix for the file name.static ISerializableThrowingSupplier<Path>
newTempFileCreator(String folder, String prefix, String suffix)
Gets a creators that creates temporary files in the given folder, and with the given prefix and suffix for the file name.static ISerializableThrowingSupplier<Path>
newTempFileCreator(Path folder)
Gets a creators that creates temporary files in the given folder.static ISerializableThrowingSupplier<Path>
newTempFileCreator(Path folder, String prefix, String suffix)
Gets a creators that creates temporary files in the given folder, and with the given prefix and suffix for the file name.
-
-
-
Method Detail
-
newTempFileCreator
public static ISerializableThrowingSupplier<Path> newTempFileCreator()
Gets a creators that creates temporary files in the default temporary directory.- Returns:
- The temporary file creator.
-
newTempFileCreator
public static ISerializableThrowingSupplier<Path> newTempFileCreator(String prefix, String suffix)
Gets a creators that creates temporary files in the default temporary directory, but with the given prefix and suffix for the file name.- Parameters:
prefix
- The prefix for the file name.suffix
- The suffix for the file name.- Returns:
- The temporary file creator.
-
newTempFileCreator
public static ISerializableThrowingSupplier<Path> newTempFileCreator(Path folder)
Gets a creators that creates temporary files in the given folder.- Parameters:
folder
- The folder in which to create the temporary files.- Returns:
- The temporary file creator.
-
newTempFileCreator
public static ISerializableThrowingSupplier<Path> newTempFileCreator(String folder)
Gets a creators that creates temporary files in the given folder.- Parameters:
folder
- The folder in which to create the temporary files.- Returns:
- The temporary file creator.
-
newTempFileCreator
public static ISerializableThrowingSupplier<Path> newTempFileCreator(Path folder, String prefix, String suffix)
Gets a creators that creates temporary files in the given folder, and with the given prefix and suffix for the file name.- Parameters:
folder
- The folder in which to create the temporary files.prefix
- The prefix for the file name.suffix
- The suffix for the file name.- Returns:
- The temporary file creator.
-
newTempFileCreator
public static ISerializableThrowingSupplier<Path> newTempFileCreator(String folder, String prefix, String suffix)
Gets a creators that creates temporary files in the given folder, and with the given prefix and suffix for the file name.- Parameters:
folder
- The folder in which to create the temporary files.prefix
- The prefix for the file name.suffix
- The suffix for the file name.- Returns:
- The temporary file creator.
-
-