Interface FileTree<T extends FileResource>
- Type Parameters:
T- the contained type
- All Known Subinterfaces:
ClassTree
- All Known Implementing Classes:
DefaultClassTree, DefaultFileTree, JavaResourceTree
The representation of a file tree. A file tree is a collection
of FileResources that are contained in a directory hierarchy
with a common root.
Implementations of this interface must provide a ResourceFactory
that supports the invocation of ResourceFactory.create(ResourceType, Project, Object...) with
arguments
Projectthe projectPaththe root directoryStringthe patternbooleanwhether to include directories (optional, defaults tofalse)
Implementations of this interface must ensure that the content
of the file tree is not evaluated before a terminal operation
is performed on the Stream returned by entries(). The delayed
evaluation includes resolving a relative path for root against
the project's directory.
-
Method Summary
Modifier and TypeMethodDescriptionclear()Re-scans the file tree for changes.delete()Deletes all files in this file tree and directories that are empty after deletion of the files (expect for root, which is not deleted).entries()Returns the paths of the files in this file tree relative to its root.Add a file name pattern to exclude from the tree.default Pathroot()Returns the root of the file tree searched for files as an absolute path.root(boolean relativize) Returns the root of the file tree containing the files.Includes directories in the file tree.Methods inherited from interface Resource
asOfLocalized, type
-
Method Details
-
withDirectories
-
exclude
-
root
-
root
-
entries
-
clear
-
delete
-