declare a Custom Tree interface that be hinted as tree type.
ProtectedonCalled for each directory after its fs.Stats have been retrieved.
Metadata about the directory, including paths, stats, and current tree node.
Must be called to continue traversal of the subtree.
ProtectedonCalled for each file after its fs.Stats have been retrieved.
Metadata about the file, including paths, stats, and current tree node.
Must be called to continue processing.
ProtectedonCalled when a directory's subtree is ready to be processed. Allows control over whether the subtree is traversed.
Metadata about the directory, including paths, and owner directory tree node.
Call this to continue processing the subtree.
Optionally call this to skip processing this subtree.
Walks a directory subtree and generates a tree structure of the files/folders. Features custom type hinting, example below.
Example