Package org.kairosdb.bigqueue.utils
Class FileUtil
- java.lang.Object
-
- org.kairosdb.bigqueue.utils.FileUtil
-
public class FileUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description FileUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddeleteDirectory(File dir)static voiddeleteFile(File file)static booleanisFilenameValid(String file)Only check if a given filename is valid according to the OS rules.
-
-
-
Method Detail
-
isFilenameValid
public static boolean isFilenameValid(String file)
Only check if a given filename is valid according to the OS rules. You still need to handle other failures when actually creating the file (e.g. insufficient permissions, lack of drive space, security restrictions).- Parameters:
file- the name of a file- Returns:
- true if the file is valid, false otherwise
-
deleteDirectory
public static void deleteDirectory(File dir)
-
deleteFile
public static void deleteFile(File file)
-
-