Class FileUtils
- java.lang.Object
-
- com.onarandombox.MultiverseCore.utils.FileUtils
-
public class FileUtils extends java.lang.Object
File-utilities.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FileUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
copyFolder(java.io.File source, java.io.File target)
Helper method to copy the world-folder.static boolean
copyFolder(java.io.File source, java.io.File target, java.util.List<java.lang.String> excludeFiles)
Helper method to copy the world-folder.static boolean
deleteFolder(java.io.File file)
Used to delete a folder.static boolean
deleteFolderContents(java.io.File file)
Used to delete the contents of a folder, without deleting the folder itself.
-
-
-
Method Detail
-
deleteFolder
public static boolean deleteFolder(java.io.File file)
Used to delete a folder.- Parameters:
file
- The folder to delete.- Returns:
- true if the folder was successfully deleted.
-
deleteFolderContents
public static boolean deleteFolderContents(java.io.File file)
Used to delete the contents of a folder, without deleting the folder itself.- Parameters:
file
- The folder whose contents to delete.- Returns:
- true if the contents were successfully deleted
-
copyFolder
public static boolean copyFolder(java.io.File source, java.io.File target)
Helper method to copy the world-folder.- Parameters:
source
- Source-Filetarget
- Target-File- Returns:
- true if it had success
-
copyFolder
public static boolean copyFolder(java.io.File source, java.io.File target, java.util.List<java.lang.String> excludeFiles)
Helper method to copy the world-folder.- Parameters:
source
- Source-Filetarget
- Target-FileexcludeFiles
- files to ignore and not copy over to Target-File- Returns:
- true if it had success
-
-