Class FileTree

java.lang.Object
org.eclipse.core.filesystem.provider.FileTree
All Implemented Interfaces:
IFileTree

public abstract class FileTree extends Object implements IFileTree
The abstract superclass of all IFileTree implementations.

Clients may subclass this class to provide a file tree for their particular file system.

Since:
org.eclipse.core.filesystem 1.0
  • Field Details

    • treeRoot

      protected IFileStore treeRoot
      The root of the file tree
  • Constructor Details

    • FileTree

      public FileTree(IFileStore treeRoot)
      Creates a new file tree with tree root as the root
      Parameters:
      treeRoot - the file store that is to act as the root of their FileTree
  • Method Details

    • getTreeRoot

      public IFileStore getTreeRoot()
      Description copied from interface: IFileTree
      Returns the root of this tree
      Specified by:
      getTreeRoot in interface IFileTree
      Returns:
      An IFileStore representing the root of the tree
    • getChildInfos

      public abstract IFileInfo[] getChildInfos(IFileStore store)
      Description copied from interface: IFileTree
      Returns an IFileInfo instance for each file and directory contained within the given store at the time this file tree was created.

      An empty array is returned if the given store has no children, or is not in this file tree.

      Specified by:
      getChildInfos in interface IFileTree
      Parameters:
      store - a file store in this tree
      Returns:
      An array of information about the children of the store, or an empty array if the store has no children.
      See Also:
    • getFileInfo

      public abstract IFileInfo getFileInfo(IFileStore store)
      Description copied from interface: IFileTree
      Returns information about this file at the time this file tree was created.

      This method succeeds regardless of whether a corresponding file exists in the file tree. In the case of a non-existent file, the returned info will include the file's name and will return false when IFileInfo.exists() is called, but all other information will assume default values.

      Specified by:
      getFileInfo in interface IFileTree
      Parameters:
      store - the store to return the file info for
      Returns:
      IFileInfo the IFileInfo for the given store
      See Also:
    • getChildStores

      public abstract IFileStore[] getChildStores(IFileStore store)
      Description copied from interface: IFileTree
      Returns an IFileStore instance for each file and directory contained within the given store at the time this file tree was created.

      An empty array is returned if the given store has no children, or is not in this file tree.

      Specified by:
      getChildStores in interface IFileTree
      Parameters:
      store - a file store in this tree
      Returns:
      The children of the store, or an empty array if the store has no children.
      See Also: