TreeRoots class final
The strategy that decides which directories are the top-level nodes of a DirectoryTree.
Each entry "contributes" a directory: a file entry its parent, a directory entry itself. The strategies differ in how contributions become roots:
- TreeRoots.minimal (default): the outermost contributions, so a tree
of
/repo/lib/a.dartstarts atlib, not at/. - TreeRoots.commonAncestor: one root per path root, at the deepest directory that contains everything.
- TreeRoots.fixed: exactly the directories you list.
- TreeRoots.filesystem: the path roots themselves (
/,C:), with every directory down to each entry.
- Annotations
Constructors
- TreeRoots.commonAncestor()
-
Uses one root per path root: the deepest directory that contains every
contribution from that path root.
const
- TreeRoots.filesystem()
-
Uses the path roots themselves (
/,C:/,//server/share/,.) as roots, with every directory between a root and its entries present.const -
TreeRoots.fixed(List<
String> paths) -
Uses exactly the directories at
pathsas roots.const - TreeRoots.minimal()
-
Uses the outermost contributions as roots.
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
Whether
otheruses the same strategy (and, for TreeRoots.fixed, the same paths in the same order).override