Data about the file/folder walked.

pub type Entry {
  Entry(filename: String, stat: Stat)


  • Entry(filename: String, stat: Stat)

A function that filters entries in the walk iterator.

pub type EntryFilter =
  fn(Entry) -> Bool

Incomplete stat data.

pub type Stat {
  Stat(is_directory: Bool)


  • Stat(is_directory: Bool)

See builder.

pub opaque type WalkBuilder(traversal_filter, path)


pub fn builder() -> WalkBuilder(Non, Non)

Create a new WalkBuilder

pub fn walk(
  builder: WalkBuilder(a, Som),
) -> Iterator(Result(Entry, FileError))

Walks the filesystem lazily.

pub fn with_path(
  builder: WalkBuilder(a, b),
  path: String,
) -> WalkBuilder(a, Som)

Create a new WalkBuilder bound to a directory path to walk

pub fn with_traversal_filter(
  builder: WalkBuilder(a, b),
  traversal_filter: fn(Entry) -> Bool,
) -> WalkBuilder(Som, b)

Create a new WalkBuilder adding an additional entry filter function.

Search Document