- Added a FileSystemInitializationError.
- Changed the static init method to check basic schema (root format and existence) before returning. - Added getRoot method that throws generic Error if inode 0 doesnt resolve.
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
import type { TreeNodeType } from "./treenode";
|
||||
|
||||
export type FileSystemError = NotADirectoryError | AlreadyExistsError | NodeNotFoundError | IllegalMutationError;
|
||||
export type FileSystemError =
|
||||
NotADirectoryError | AlreadyExistsError | NodeNotFoundError | IllegalMutationError | FileSystemInitializationError;
|
||||
|
||||
export interface FileSystemInitializationError {
|
||||
type: "FileSystemInitializationError";
|
||||
message: string;
|
||||
timestamp: number;
|
||||
}
|
||||
|
||||
export interface NotADirectoryError {
|
||||
inode: number;
|
||||
|
||||
Reference in New Issue
Block a user