touch_grass/file_system/read_directory

Read all the entries in a directory. Excludes self . and parent ..

The closest syscall is getdents but most other ecosystems use the read directory terminology

This effect includes status information about the returned entires.

Types

pub type Entry {
  Directory
  File(size: Int)
}

Constructors

  • Directory
  • File(size: Int)
pub type Output =
  Result(List(#(String, Entry)), String)

Values

pub const decode: fn(value.Value(c, d)) -> Result(
  String,
  break.Reason(c, d),
)
pub fn encode(
  result: Result(List(#(String, Entry)), String),
) -> value.Value(a, b)
Search Document