Dir

Err

NotFound - This error is raised when the specified directory does not exist, typically during attempts to access or manipulate it.

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

AlreadyExists - This error is thrown when trying to create a directory that already exists.

NotADirectory - Raised when an operation that requires a directory (e.g., listing contents) is attempted on a file instead.

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

DirEntry

Record which represents a directory

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

Lists the files and directories inside the directory.

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

Deletes a directory if it's empty

This may fail if:

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

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

This may fail if:

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

Creates a directory

This may fail if:

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

Creates a directory recursively adding any missing parent directories.

This may fail if: