public class ExtendedFile
extends java.io.File
Modifier and Type | Field and Description |
---|---|
static java.io.FileFilter |
onlyDirectories |
static java.io.FileFilter |
onlyFiles |
Constructor and Description |
---|
ExtendedFile(java.io.File parent,
java.lang.String child)
Creates a new ExtendedFile instance from a parent abstract pathname and a child pathname string.
|
ExtendedFile(java.lang.String pathname)
Creates a new ExtendedFile instance by converting the given pathname string into an abstract pathname.
|
ExtendedFile(java.lang.String parent,
java.lang.String child)
Creates a new ExtendedFile instance from a parent pathname string and a child pathname string.
|
ExtendedFile(java.net.URI uri)
Creates a new ExtendedFile instance by converting the given file: URI into an abstract pathname.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
listTree()
Retrives a subdirectory-tree with any subdirectory.
|
java.lang.String[] |
listTree(java.io.FileFilter filter)
Retrieves a subdirectory-tree with specific subdirectories filtered by the fileFilter.
|
java.io.File[] |
listTreeDirectories()
Retrives a subdirectory-tree with any subdirectory.
|
java.io.File[] |
listTreeDirectories(java.io.FileFilter filter)
Retrieves a subdirectory-tree with specific subdirectories filtered by the fileFilter.
|
boolean |
rmDir()
Remove a directory.
|
boolean |
rmDir(boolean force)
Remove a directory.
|
boolean |
rmDirs()
Remove directories and subdirectories.
|
boolean |
rmDirs(boolean force)
Remove directories and subdirectories.
|
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURL
public static final java.io.FileFilter onlyDirectories
public static final java.io.FileFilter onlyFiles
public ExtendedFile(java.lang.String pathname)
pathname
- - A pathname string.java.io.File.File(String pathname)
public ExtendedFile(java.net.URI uri)
uri
- - An absolute, hierarchical URI with a scheme equal to "file",
a non-empty path component, and undefined authority,
query, and fragment componentsjava.io.File.File(URI uri)
public ExtendedFile(java.lang.String parent, java.lang.String child)
parent
- - The parent pathname stringchild
- - The child pathname stringjava.io.File.File(String parent, String child)
public ExtendedFile(java.io.File parent, java.lang.String child)
parent
- - The parent pathname abstract pathnamechild
- - The child pathname stringjava.io.File.File(String parent, String child)
public java.io.File[] listTreeDirectories()
public java.io.File[] listTreeDirectories(java.io.FileFilter filter)
filter
- - A FileFilter to select only specific directories.public java.lang.String[] listTree()
public java.lang.String[] listTree(java.io.FileFilter filter)
filter
- - A FileFilter to select only specific directories.public boolean rmDir()
public boolean rmDir(boolean force)
force
- - A boolean, TRUE forces to delete files.public boolean rmDirs()
public boolean rmDirs(boolean force)
force
- - boolean, TRUE forces to delete files.