Module fs/dir
fs/dir
Async directory operations — create, remove, read, link, rename.
Wraps low-level std/sys/dir with typed APIs using the Exception effect.
Example
{ create_dir, remove_dir, read_dir } :: import "std/fs/dir";
{ Path } :: import "std/path";
main :: (fn(io : Io, exn : Exception) -> unit)({
io.await(create_dir(Path.new(`/tmp/yo_test`), io), { io, exn });
entries := io.await(read_dir(Path.new(`/tmp/yo_test`), io), { io, exn });
io.await(remove_dir(Path.new(`/tmp/yo_test`), io), { io, exn });
});