Package com.fizzed.crux.util
Class MoreFiles
- java.lang.Object
-
- com.fizzed.crux.util.MoreFiles
-
public class MoreFiles extends java.lang.ObjectMethods that java.nio.Files should include.- Author:
- jjlauer
-
-
Constructor Summary
Constructors Constructor Description MoreFiles()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddeleteDirectory(java.nio.file.Path dir)Deletes a directory (and all the files in it).static booleandeleteDirectoryIfExists(java.nio.file.Path dir)Deletes a directory if it exists (and all the files in it).
-
-
-
Method Detail
-
deleteDirectory
public static void deleteDirectory(java.nio.file.Path dir) throws java.io.IOExceptionDeletes a directory (and all the files in it).- Parameters:
dir- the directory to delete- Throws:
java.io.IOException
-
deleteDirectoryIfExists
public static boolean deleteDirectoryIfExists(java.nio.file.Path dir) throws java.io.IOExceptionDeletes a directory if it exists (and all the files in it).- Parameters:
dir- the directory to delete- Returns:
- True if deleted or false if it the dir did not exist
- Throws:
java.io.IOException
-
-