FileSystemErrorModule

PackageAxial.FileSystem
Describes a meaningful file-system failure.

Summary

NameSignatureSynopsis
Union cases
IsDirectoryNotFoundthis.IsDirectoryNotFoundNo description available.
IsIothis.IsIoNo description available.
IsUnsupportedthis.IsUnsupportedNo description available.
IsInvalidPaththis.IsInvalidPathNo description available.
IsAlreadyExiststhis.IsAlreadyExistsNo description available.
IsFileNotFoundthis.IsFileNotFoundNo description available.
IsUnexpectedthis.IsUnexpectedNo description available.
IsPathTooLongthis.IsPathTooLongNo description available.
IsUnauthorizedthis.IsUnauthorizedNo description available.
FileNotFoundFileNotFound pathA file was not found.
DirectoryNotFoundDirectoryNotFound pathA directory was not found.
AlreadyExistsAlreadyExists pathThe requested path already exists.
UnauthorizedUnauthorized(path, message)The caller is not authorized to access the requested path.
InvalidPathInvalidPath(path, message)The requested path was invalid.
PathTooLongPathTooLong(path, message)The requested path was too long for the platform.
IoIo(path, message)The operation failed with a general I/O error.
UnsupportedUnsupported(path, message)The operation is not supported by the current platform or path shape.
UnexpectedUnexpected(path, message)An unexpected exception escaped a file-system operation.
Operations
fromExceptionFileSystemError.fromException path errorClassifies an exception raised by a file-system operation.
describeFileSystemError.describe errorFormats a human-readable description for a file-system error.

Union cases

kind:member

IsDirectoryNotFound

this.IsDirectoryNotFound
Member

Returns

bool
kind:member

IsIo

this.IsIo
Member

Returns

bool
kind:member

IsUnsupported

this.IsUnsupported
Member

Returns

bool
kind:member

IsInvalidPath

this.IsInvalidPath
Member

Returns

bool
kind:member

IsAlreadyExists

this.IsAlreadyExists
Member

Returns

bool
kind:member

IsFileNotFound

this.IsFileNotFound
Member

Returns

bool
kind:member

IsUnexpected

this.IsUnexpected
Member

Returns

bool
kind:member

IsPathTooLong

this.IsPathTooLong
Member

Returns

bool
kind:member

IsUnauthorized

this.IsUnauthorized
Member

Returns

bool
kind:member

FileNotFound

FileNotFound path
Member
A file was not found.

Parameters

NameTypeDescription
pathstring

Returns

unit
kind:member

DirectoryNotFound

DirectoryNotFound path
Member
A directory was not found.

Parameters

NameTypeDescription
pathstring

Returns

unit
kind:member

AlreadyExists

AlreadyExists path
Member
The requested path already exists.

Parameters

NameTypeDescription
pathstring

Returns

unit
kind:member

Unauthorized

Unauthorized(path, message)
Member
The caller is not authorized to access the requested path.

Parameters

NameTypeDescription
pathstring option
messagestring

Returns

unit
kind:member

InvalidPath

InvalidPath(path, message)
Member
The requested path was invalid.

Parameters

NameTypeDescription
pathstring option
messagestring

Returns

unit
kind:member

PathTooLong

PathTooLong(path, message)
Member
The requested path was too long for the platform.

Parameters

NameTypeDescription
pathstring option
messagestring

Returns

unit
kind:member

Io

Io(path, message)
Member
The operation failed with a general I/O error.

Parameters

NameTypeDescription
pathstring option
messagestring

Returns

unit
kind:member

Unsupported

Unsupported(path, message)
Member
The operation is not supported by the current platform or path shape.

Parameters

NameTypeDescription
pathstring option
messagestring

Returns

unit
kind:member

Unexpected

Unexpected(path, message)
Member
An unexpected exception escaped a file-system operation.

Parameters

NameTypeDescription
pathstring option
messagestring

Returns

unit

Operations

kind:member

fromException

FileSystemError.fromException path error
Member
Classifies an exception raised by a file-system operation.

Parameters

NameTypeDescription
pathstring option
errorexn

Returns

FileSystemError
kind:member

describe

FileSystemError.describe error
Member
Formats a human-readable description for a file-system error.

Parameters

NameTypeDescription
errorFileSystemError

Returns

string