Dir

Err : Path.DirErr

NotFound - This error is raised when the specified path does not exist, typically during attempts to access or manipulate it, but also potentially when trying to create a directory and a parent directory does not exist.

PermissionDenied - Occurs when the user lacks the necessary permissions to perform an action on a directory, such as reading, writing, or executing.

Other - A catch-all for any other types of errors not explicitly listed above.

This is the same as [Path.DirErr].

DirEntry : Path.DirEntry

Record which represents a directory

This is the same as [Path.DirEntry].

list : Str -> Task (List Path) [DirErr Err]

Lists the files and directories inside the directory.

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

deleteEmpty : Str -> Task {} [DirErr Err]

Deletes a directory if it's empty

This may fail if:

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

deleteAll : Str -> Task {} [DirErr Err]

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

This may fail if:

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

create : Str -> Task {} [DirErr Err]

Creates a directory

This may fail if:

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

createAll : Str -> Task {} [DirErr Err]

Creates a directory recursively adding any missing parent directories.

This may fail if:

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