public class PathManager<T extends PathManager<T>>
An instance of this class is a handle on a temporary path.
If necessary, additional handles on the same path can be created using the PathManager.handle
method.
The path is (recursively) deleted when PathManager.close
is called on the last handle, typically at the end of a use expression.
The value of eager cleanup of temporary files is that there are cases when shutdown hooks don't run e.g. SIGKILL.
PathManager.handle
,
PathManager.close
,
useConstructor and Description |
---|
PathManager(java.nio.file.Path path)
An instance of this class is a handle on a temporary path.
If necessary, additional handles on the same path can be created using the
PathManager.handle method.
The path is (recursively) deleted when PathManager.close is called on the last handle, typically at the end of a use expression.
The value of eager cleanup of temporary files is that there are cases when shutdown hooks don't run e.g. SIGKILL. |
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.nio.file.Path |
getPath() |
T |
handle() |
public PathManager(java.nio.file.Path path)
An instance of this class is a handle on a temporary path.
If necessary, additional handles on the same path can be created using the PathManager.handle
method.
The path is (recursively) deleted when PathManager.close
is called on the last handle, typically at the end of a use expression.
The value of eager cleanup of temporary files is that there are cases when shutdown hooks don't run e.g. SIGKILL.
PathManager.handle
,
PathManager.close
,
use