public class Directory extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Directory.FileFilter |
static class |
Directory.FileNames
File names.
|
| Constructor and Description |
|---|
Directory() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
create(String path)
Creates directory for the given path.
|
static String |
current()
Retrieves the current directory for the current process.
|
static void |
findFiles(String directoryPath,
String pattern,
Directory.FileNames names)
Returns a collection of strings naming the files in the directory denoted
by the given pathname that satisfy the specified filename pattern.
|
static boolean |
isDirectory(String path)
Checks that the given file path represents a directory.
|
public static String current()
public static void findFiles(String directoryPath, String pattern, Directory.FileNames names)
directoryPath - directory pathpattern - filename patterns to be foundnames - found filenamespublic static boolean isDirectory(String path)
path - file path to be checkedtrue if and only if the file denoted by this abstract pathname exists and is a directory;
false otherwisepublic static boolean create(String path)
path - path of the directory to be createdtrue if and only if the directory was created, along with all necessary parent directories;
false otherwiseCopyright © 2005–2025 Onix Solutions. All rights reserved.