Package org.jgroups.blocks
Class GridFile
java.lang.Object
java.io.File
org.jgroups.blocks.GridFile
- All Implemented Interfaces:
Serializable,Comparable<File>
Subclass of File to iterate through directories and files in a grid
- Author:
- Bela Ban
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar -
Method Summary
Modifier and TypeMethodDescriptionprotected String[]protected File[]_listFiles(Object filter) protected booleancheckParentDirs(String path, boolean create_if_absent) Checks whether the parent directories are present (and are directories).booleanbooleandelete()booleandelete(boolean synchronous) booleanexists()protected static StringintgetName()getPath()protected voidprotected static booleanVerifies whether child is a child (dir or file) of parentbooleanbooleanisFile()longlength()String[]list()String[]list(FilenameFilter filter) File[]File[]listFiles(FileFilter filter) File[]listFiles(FilenameFilter filter) booleanmkdir()booleanmkdirs()protected static StringMethods inherited from class java.io.File
canExecute, canRead, canWrite, compareTo, createTempFile, createTempFile, deleteOnExit, equals, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getParent, getParentFile, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isHidden, lastModified, listRoots, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURL
-
Method Details
-
getName
-
getPath
-
length
public long length() -
getChunkSize
public int getChunkSize() -
createNewFile
- Overrides:
createNewFilein classFile- Throws:
IOException
-
delete
public boolean delete() -
delete
public boolean delete(boolean synchronous) -
mkdir
public boolean mkdir() -
mkdirs
public boolean mkdirs() -
exists
public boolean exists() -
list
-
list
-
listFiles
-
listFiles
-
listFiles
-
isDirectory
public boolean isDirectory()- Overrides:
isDirectoryin classFile
-
isFile
public boolean isFile() -
initMetadata
protected void initMetadata() -
_listFiles
-
_list
-
isChildOf
Verifies whether child is a child (dir or file) of parent- Parameters:
parent-child-- Returns:
- True if child is a child, false otherwise
-
filename
-
checkParentDirs
Checks whether the parent directories are present (and are directories). If create_if_absent is true, creates missing dirs- Parameters:
path-create_if_absent-- Returns:
- Throws:
IOException
-
trim
-