the starting point for the traversal, which should be a directory.
pre- and post-hooks for the walk. The pre-hook is
called for each directory after it is yielded; if it returns a
falsey value, the directory is not traversed. The post-hook is
called after a directory's contents have all been traversed. The
starting point does not get treated as part of the traversal, i.e.,
it starts with the contents of the directory at path
.
walk is a generator function that yields the files and directories under a given path, in a preorder traversal. "Preorder" means that the traversal is depth-first, and a directory is yielded immediately before the traversal examines its contents.