Class GridFile

java.lang.Object
java.io.File
org.jgroups.blocks.GridFile
All Implemented Interfaces:
Serializable, Comparable<File>

public class GridFile extends File
Subclass of File to iterate through directories and files in a grid
Author:
Bela Ban
See Also:
  • Method Details

    • getName

      public String getName()
      Overrides:
      getName in class File
    • getPath

      public String getPath()
      Overrides:
      getPath in class File
    • length

      public long length()
      Overrides:
      length in class File
    • getChunkSize

      public int getChunkSize()
    • createNewFile

      public boolean createNewFile() throws IOException
      Overrides:
      createNewFile in class File
      Throws:
      IOException
    • delete

      public boolean delete()
      Overrides:
      delete in class File
    • delete

      public boolean delete(boolean synchronous)
    • mkdir

      public boolean mkdir()
      Overrides:
      mkdir in class File
    • mkdirs

      public boolean mkdirs()
      Overrides:
      mkdirs in class File
    • exists

      public boolean exists()
      Overrides:
      exists in class File
    • list

      public String[] list()
      Overrides:
      list in class File
    • list

      public String[] list(FilenameFilter filter)
      Overrides:
      list in class File
    • listFiles

      public File[] listFiles()
      Overrides:
      listFiles in class File
    • listFiles

      public File[] listFiles(FilenameFilter filter)
      Overrides:
      listFiles in class File
    • listFiles

      public File[] listFiles(FileFilter filter)
      Overrides:
      listFiles in class File
    • isDirectory

      public boolean isDirectory()
      Overrides:
      isDirectory in class File
    • isFile

      public boolean isFile()
      Overrides:
      isFile in class File
    • initMetadata

      protected void initMetadata()
    • _listFiles

      protected File[] _listFiles(Object filter)
    • _list

      protected String[] _list(Object filter)
    • isChildOf

      protected static boolean isChildOf(String parent, String child)
      Verifies whether child is a child (dir or file) of parent
      Parameters:
      parent -
      child -
      Returns:
      True if child is a child, false otherwise
    • filename

      protected static String filename(String full_path)
    • checkParentDirs

      protected boolean checkParentDirs(String path, boolean create_if_absent) throws IOException
      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

      protected static String trim(String str)