Package dev.architectury.loom.util
Class TempFiles
java.lang.Object
dev.architectury.loom.util.TempFiles
- All Implemented Interfaces:
Closeable,AutoCloseable
A helper for temporary files and directories
that cleans up when closed by deleting all created
temp files.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TempFiles
public TempFiles()
-
-
Method Details
-
directory
Creates a temporary directory.- Parameters:
prefix- a prefix for the directory's name- Returns:
- the created directory
- Throws:
IOException
-
file
Creates a temporary file.- Parameters:
prefix- a prefix for the file's namesuffix- a suffix for the file's name- Returns:
- the created file
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-