21 #ifndef G_FILE_TREE__H
22 #define G_FILE_TREE__H
A class for walking files in a directory tree, with repositioning.
A directory tree iterator for sorted, depth-first traversal of files and directories.
FileTree()
Default contructor for an empty tree.
void reroot(const G::Path &root)
Resets the root, as if newly constructed.
bool reposition(const G::Path &path)
Repositions the iterator within the current tree, at or after the given position. ...
void reverse(bool=true)
Iterate in reverse, and reposition() to at-or-before rather than at-or-after.
void swap(FileTree &other)
Swaps this and other.
bool reversed() const
Returns true if currently reverse()d.
G::Path current() const
Returns the current path.
bool moved() const
Returns true after construction, reroot(), first(), last() or a successful reposition().
bool first()
Repositions to the root() position, or to the last position if currently reversed().
G::Path next()
Moves to the next file in the tree, depth first, and returns the path.
G::Path root() const
Returns the current root, as passed to the constructor or reroot().
A callback interface to allow G::DirectoryTree to ignore paths.
A Path object represents a file system path.
bool last()
Repositions to the last position (so that next() will soon go off the end), or to the root() if curre...