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 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 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
-
getChunkSize
public int getChunkSize() -
createNewFile
- Overrides:
createNewFilein classFile- Throws:
IOException
-
delete
-
delete
public boolean delete(boolean synchronous) -
mkdir
-
mkdirs
-
exists
-
list
-
list
-
listFiles
-
listFiles
-
listFiles
-
isDirectory
public boolean isDirectory()- Overrides:
isDirectoryin classFile
-
isFile
-
initMetadata
protected void initMetadata() -
_listFiles
-
_list
-
isChildOf
-
filename
-
checkParentDirs
Checks whether the parent directories are present (and are directories). If create_if_absent is true, creates missing dirs- Throws:
IOException
-
trim
-