Dir

IOErr

Tag union of possible errors when reading and writing a file or directory.

This is the same as File.IOErr.

DirEntry : Path.DirEntry

Record which represents a directory

This is the same as Path.DirEntry.

list! : Str => Result (List Path) [DirErr IOErr]

Lists the files and directories inside the directory.

Path.list_dir! does the same thing, except it takes a Path instead of a Str.

delete_empty! : Str => Result {} [DirErr IOErr]

Deletes a directory if it's empty

This may fail if:

Path.delete_empty! does the same thing, except it takes a Path instead of a Str.

delete_all! : Str => Result {} [DirErr IOErr]

Recursively deletes the directory as well as all files and directories inside it.

This may fail if:

Path.delete_all! does the same thing, except it takes a Path instead of a Str.

create! : Str => Result {} [DirErr IOErr]

Creates a directory

This may fail if:

Path.create_dir! does the same thing, except it takes a Path instead of a Str.

create_all! : Str => Result {} [DirErr IOErr]

Creates a directory recursively adding any missing parent directories.

This may fail if:

Path.create_all! does the same thing, except it takes a Path instead of a Str.