VirtualFileSystemError overview
Tagged errors shared by the public filesystem API and its implementation.
Added in v0.1.0
errors
ConfigurationError (class)
An invalid volume or caller option, identified by its field name.
Signature
export declare class ConfigurationError extends Data.TaggedError("ConfigurationError")<{
readonly field: string
}> {}Example
import { VirtualFileSystemError } from "@effect-vfs/core"
const error = new VirtualFileSystemError.ConfigurationError({ field: "maxEntries" })
console.log(error.field, error.message)
// maxEntries Invalid option: maxEntriesAdded in v0.1.0
FsError (class)
An expected filesystem operation failure.
The code distinguishes portable failures while operation names the action.
Byte paths are intentionally omitted from the formatted message.
Signature
export declare class FsError extends Data.TaggedError("FsError")<{
readonly code: FsCode
readonly operation: string
readonly path?: PathInput
}> {}Example
import { VirtualFileSystemError } from "@effect-vfs/core"
const error = new VirtualFileSystemError.FsError({ code: "NotFound", operation: "readFile" })
console.log(error.code, error.message)
// NotFound readFile failed with NotFoundAdded in v0.1.0