java.lang.Object
io.redlink.utils.PathUtils
Various Utils for
Path
s.-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Copy a file/directory.static void
Copy a file/directorystatic void
copyRecursive
(Path source, Path dest) Recursively copy a directorystatic void
copyRecursive
(Path source, Path dest, boolean preserve) Recursively copy a directorystatic void
deleteRecursive
(Path path) Recursively delete a file/directorystatic void
deleteRecursive
(Path path, boolean followSymlinks) Recursively delete a file/directory
-
Method Details
-
copy
Copy a file/directory.- Parameters:
source
- the sourcedest
- the destination- Throws:
IOException
-
copy
Copy a file/directory- Parameters:
source
- the sourcedest
- the destinationpreserve
- preserve attributes- Throws:
IOException
-
copyRecursive
Recursively copy a directory- Parameters:
source
- the sourcedest
- the destination- Throws:
IOException
-
copyRecursive
Recursively copy a directory- Parameters:
source
- the sourcedest
- the destinationpreserve
- preserve attributes- Throws:
IOException
-
deleteRecursive
Recursively delete a file/directory- Parameters:
path
- the file/directory to delete- Throws:
IOException
-
deleteRecursive
Recursively delete a file/directory- Parameters:
path
- the file/directory to deletefollowSymlinks
- whether to follow symlinks while deleting- Throws:
IOException
-