Skip to content

Variable: REASONS

Documentation / @wtf/platform-fs / errors / REASONS

const REASONS: Readonly<Record<FileSystemErrorName, SystemErrorReason>>;

Defined in: packages/platform-fs/src/errors.ts:50

The reason of each DOMException a handle fails with:

NameReasonOf
NotFoundErrorNotFoundan entry that is not there
TypeMismatchErrorBadResourcean entry of the other kind
InvalidModificationErrorBadResourcea folder not empty, a folder into itself
InvalidStateErrorBadResourcea handle or a writable of no more use
NoModificationAllowedErrorBusyan entry another writable holds
NotAllowedErrorPermissionDeniedwhat may not be read or written
SecurityErrorPermissionDeniedwhat the page may not reach
QuotaExceededErrorWriteZeroa write with no room left
NotReadableErrorInvalidDataa snapshot stale, a read failed
TimeoutErrorTimedOuta wait that ran out
NotSupportedErrorUnknownwhat the platform does not do
AbortErrorUnknowna call aborted

The cause’s name tells two of one reason apart.