Class FileTree
- java.lang.Object
-
- org.eclipse.core.filesystem.provider.FileTree
-
-
Field Summary
Fields Modifier and Type Field Description protected IFileStore
treeRoot
The root of the file tree
-
Constructor Summary
Constructors Constructor Description FileTree(IFileStore treeRoot)
Creates a new file tree with tree root as the root
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract IFileInfo[]
getChildInfos(IFileStore store)
Returns anIFileInfo
instance for each file and directory contained within the given store at the time this file tree was created.abstract IFileStore[]
getChildStores(IFileStore store)
Returns anIFileStore
instance for each file and directory contained within the given store at the time this file tree was created.abstract IFileInfo
getFileInfo(IFileStore store)
Returns information about this file at the time this file tree was created.IFileStore
getTreeRoot()
Returns the root of this tree
-
-
-
Field Detail
-
treeRoot
protected IFileStore treeRoot
The root of the file tree
-
-
Constructor Detail
-
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 Detail
-
getTreeRoot
public IFileStore getTreeRoot()
Description copied from interface:IFileTree
Returns the root of this tree- Specified by:
getTreeRoot
in interfaceIFileTree
- Returns:
- An IFileStore representing the root of the tree
-
getChildInfos
public abstract IFileInfo[] getChildInfos(IFileStore store)
Description copied from interface:IFileTree
Returns anIFileInfo
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 interfaceIFileTree
- 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:
IFileStore.childInfos(int, org.eclipse.core.runtime.IProgressMonitor)
-
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
whenIFileInfo.exists()
is called, but all other information will assume default values.- Specified by:
getFileInfo
in interfaceIFileTree
- Parameters:
store
- the store to return the file info for- Returns:
- IFileInfo the IFileInfo for the given store
- See Also:
IFileStore.fetchInfo(int, org.eclipse.core.runtime.IProgressMonitor)
-
getChildStores
public abstract IFileStore[] getChildStores(IFileStore store)
Description copied from interface:IFileTree
Returns anIFileStore
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 interfaceIFileTree
- 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:
IFileStore.childStores(int, org.eclipse.core.runtime.IProgressMonitor)
-
-