Home

Awesome

DirWalker

DirWalker lazily traverses one or more directory trees, depth first, returning successive file names.

Initialize the walker using

{:ok, walker} = DirWalker.start_link(path, [, options ]) # or [path, path...]

Then return the next n path names using

paths = DirWalker.next(walker [, n \\ 1])

Successive calls to next will return successive file names, until all file names have been returned.

These methods have also been wrapped into a Stream resource.

paths = DirWalker.stream(path [, options]) # or [path,path...]

By default DirWalker will follow any symlinks found. With the include_stat option, it will instead simply return the File.Stat of the symlink and it is up to the calling code to handle symlinks.

options is a map containing zero or more of: