public class FileOps extends Object
Modifier and Type | Method and Description |
---|---|
static String |
basename(String filename) |
static void |
clearDirectory(String dir) |
static void |
delete(File f,
boolean reportExistsAfter) |
static void |
delete(String filename)
Delete a file
|
static void |
deleteSilent(String filename) |
static void |
ensureDir(String dirname) |
static boolean |
exists(String path) |
static boolean |
existsAnyFiles(String dir)
See if there are any files in this directory
|
static String |
fullDirectoryPath(String filename) |
static String |
fullPath(String filename) |
static boolean |
isEmpty(String filename) |
static Tuple<String> |
splitDirBaseExt(String filename)
Split a file name into path, basename and extension.
|
static Tuple<String> |
splitDirFile(String filename)
Split a file name into path and filename.
|
public static void delete(String filename)
filename
- public static void deleteSilent(String filename)
public static void delete(File f, boolean reportExistsAfter)
public static void clearDirectory(String dir)
public static boolean existsAnyFiles(String dir)
public static boolean exists(String path)
public static boolean isEmpty(String filename)
public static void ensureDir(String dirname)
public static Tuple<String> splitDirBaseExt(String filename)
public static Tuple<String> splitDirFile(String filename)
Licenced under the Apache License, Version 2.0