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 entries.

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)
pub fn entry() -> isomorphic.Type(a)

A single directory entry, a name and what is at that name.

pub const label: String
pub fn lift() -> isomorphic.Type(a)
pub fn lower() -> isomorphic.Type(a)
Search Document