diff options
author | Gary Gregory <garydgregory@gmail.com> | 2023-01-27 17:09:13 -0500 |
---|---|---|
committer | Gary Gregory <garydgregory@gmail.com> | 2023-01-27 17:09:13 -0500 |
commit | b894d66cf07f8ab76f048779b8dcb91f7511f0ce (patch) | |
tree | d14a0643d3fb1bfdf57cbda80fc4055e61ca369b /src/main | |
parent | 48c3cc5ac4cac73ce769b4e313b6442575f5f166 (diff) | |
download | apache-commons-io-b894d66cf07f8ab76f048779b8dcb91f7511f0ce.tar.gz |
Port some test code from IO to NIO APIs
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/apache/commons/io/file/PathUtils.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/org/apache/commons/io/file/PathUtils.java b/src/main/java/org/apache/commons/io/file/PathUtils.java index 65900606..fd6cccbf 100644 --- a/src/main/java/org/apache/commons/io/file/PathUtils.java +++ b/src/main/java/org/apache/commons/io/file/PathUtils.java @@ -567,6 +567,16 @@ public final class PathUtils { } /** + * Delegates to {@link File#deleteOnExit()}. + * + * @param path the path to delete. + * @since 3.13.0 + */ + public static void deleteOnExit(Path path) { + Objects.requireNonNull(path.toFile()).deleteOnExit(); + } + + /** * Compares the file sets of two Paths to determine if they are equal or not while considering file contents. The * comparison includes all files in all subdirectories. * |