Class TempPath
java.lang.Object
velox.api.layer1.common.temporaryfiles.TempPath
- All Implemented Interfaces:
Closeable,AutoCloseable
Represents a temporary file or dir and its associated lock.
Lock is created in the constructor and released by calling
dispose(boolean) or close().
The lock is set on a separate file.- See Also:
-
Constructor Details
-
TempPath
- Throws:
IOException
-
TempPath
- Throws:
IOException
-
-
Method Details
-
get
- Returns:
- The managed path, in absolute, normalized form.
-
createFile
Create a file for the managed path and return it.- Throws:
IOException
-
createDirectory
Create a directory for the managed path and return it.- Throws:
IOException
-
dispose
Releases the lock associated with this path.If an exception gets thrown during an intermediary step, all the files will get cleaned up during root temp dir cleanup anyway.
- Parameters:
deletePath- if true, also deletes the managed file or directory, recursively.- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
toString
-