fswalk
Types
pub type Entry {
Entry(filename: String, stat: Stat)
}
Constructors
-
Entry(filename: String, stat: Stat)
pub type EntryFilter =
fn(Entry) -> Bool
Private. Pending gleam/issues/2486
pub opaque type Non
Private. Pending gleam/issues/2486
pub opaque type Som
Weak stat implementation.
pub type Stat {
Stat(is_directory: Bool)
}
Constructors
-
Stat(is_directory: Bool)
See builder.
pub opaque type WalkBuilder(filter, path)
Functions
pub fn walk(
builder: WalkBuilder(a, Som),
) -> Iterator(Result(Entry, FileError))
Walks the filesystem lazily.
pub fn with_filter(
builder: WalkBuilder(a, b),
filter: fn(Entry) -> Bool,
) -> WalkBuilder(Som, b)
Create a new WalkBuilder bound to a filter function. The filter should only expect directories passed in the Entry instances.