public class Files
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Files.DeleteThread |
static class |
Files.FileDoesNotExistException |
static class |
Files.FileRuntimeException |
static class |
Files.NoopOutputStream |
static class |
Files.PatternFileFilter |
Constructor and Description |
---|
Files() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.io.File> |
collect(java.io.File dir,
java.io.FileFilter filter) |
static java.util.List<java.io.File> |
collect(java.io.File dir,
java.util.regex.Pattern pattern) |
static java.util.List<java.io.File> |
collect(java.io.File dir,
java.lang.String regex) |
static void |
delete(java.io.File file)
Delete a file and all contents if specified file is a directory.
|
static void |
deleteOnExit(java.io.File file) |
static java.io.File |
dir(java.io.File file) |
static java.io.File |
exists(java.io.File file) |
static java.io.File |
exists(java.io.File file,
java.lang.String s) |
static java.io.File |
file(java.io.File file) |
static void |
flagForDeleteOnExit(java.io.File file) |
static java.lang.String |
hash(java.util.Set<java.net.URL> urls,
java.lang.String algo) |
static java.util.Set<java.net.URL> |
listJars(java.lang.String path) |
static java.io.File |
mkdir(java.io.File file) |
static java.io.File |
mkdir(java.io.File file,
java.lang.String name) |
static java.io.File |
mkdirs(java.io.File file) |
static java.io.File |
mkparent(java.io.File file) |
static java.io.File |
notHidden(java.io.File file) |
static java.io.File |
path(java.io.File dir,
java.lang.String... parts) |
static java.io.File |
path(java.lang.String... parts) |
static java.io.File |
readable(java.io.File file) |
static java.io.File |
readableFile(java.io.File file) |
static void |
remove(java.io.File file)
Delete a file and all contents if specified file is a directory
|
static java.io.File |
select(java.io.File dir,
java.lang.String pattern) |
static java.io.File |
tmpdir() |
static java.io.File |
toFile(java.net.URL url) |
static java.io.File |
touch(java.io.File file) |
static java.io.File |
writable(java.io.File file) |
public static java.io.File path(java.lang.String... parts)
public static java.io.File path(java.io.File dir, java.lang.String... parts)
public static java.util.List<java.io.File> collect(java.io.File dir, java.lang.String regex)
public static java.util.List<java.io.File> collect(java.io.File dir, java.util.regex.Pattern pattern)
public static java.util.List<java.io.File> collect(java.io.File dir, java.io.FileFilter filter)
public static java.io.File exists(java.io.File file, java.lang.String s)
public static java.io.File exists(java.io.File file)
public static java.io.File dir(java.io.File file)
public static java.io.File touch(java.io.File file) throws java.io.IOException
java.io.IOException
public static java.io.File file(java.io.File file)
public static java.io.File notHidden(java.io.File file)
public static java.io.File writable(java.io.File file)
public static java.io.File readable(java.io.File file)
public static java.io.File readableFile(java.io.File file)
public static java.io.File mkdir(java.io.File file)
public static java.io.File mkdir(java.io.File file, java.lang.String name)
public static java.io.File tmpdir()
public static java.io.File mkparent(java.io.File file)
public static java.io.File mkdirs(java.io.File file)
public static void deleteOnExit(java.io.File file)
public static void flagForDeleteOnExit(java.io.File file)
public static void delete(java.io.File file)
file
- Filepublic static void remove(java.io.File file)
file
- Filepublic static java.io.File select(java.io.File dir, java.lang.String pattern)
public static java.util.Set<java.net.URL> listJars(java.lang.String path)
public static java.io.File toFile(java.net.URL url)
public static java.lang.String hash(java.util.Set<java.net.URL> urls, java.lang.String algo)