import "github.com/rclone/rclone/fs/dirtree"
Package dirtree contains the DirTree type which is used for building filesystem heirachies in memory.
type DirTree map[string]fs.DirEntries
DirTree is a map of directories to entries
New returns a fresh DirTree
Add an entry to the tree it doesn't create parents
AddDir adds a directory entry to the tree this creates the directory itself if required it doesn't create parents
AddEntry adds the entry and creates the parents for it regardless of whether it is a file or a directory.
CheckParent checks that dirPath has a *Dir in its parent
CheckParents checks every directory in the tree has *Dir in its parent
Dirs returns the directories in sorted order
Find returns the DirEntry for filePath or nil if not found
Prune remove directories from a directory tree. dirNames contains all directories to remove as keys, with true as values. dirNames will be modified in the function.
Sort sorts all the Entries
String emits a simple representation of the DirTree
Package dirtree imports 7 packages (graph) and is imported by 21 packages. Updated 2019-07-28. Refresh now. Tools for package owners.