diff --git a/src/api/Filesystem.ts b/src/api/Filesystem.ts index 12a8b2da..734372fc 100644 --- a/src/api/Filesystem.ts +++ b/src/api/Filesystem.ts @@ -223,60 +223,6 @@ abstract class AnuraFSOperations { callback?: (err: Error | null) => void, ): void; - abstract setxattr( - path: string, - name: string, - value: string | object, - flag: "CREATE" | "REPLACE", - callback?: (err: Error | null) => void, - ): void; - - abstract setxattr( - path: string, - name: string, - value: string | object, - callback?: (err: Error | null) => void, - ): void; - - abstract fsetxattr( - fd: AnuraFD, - name: string, - value: string | object, - flag: "CREATE" | "REPLACE", - callback?: (err: Error | null) => void, - ): void; - - abstract fsetxattr( - fd: AnuraFD, - name: string, - value: string | object, - callback?: (err: Error | null) => void, - ): void; - - abstract getxattr( - path: string, - name: string, - callback?: (err: Error | null, value: string | object) => void, - ): void; - - abstract fgetxattr( - fd: AnuraFD, - name: string, - callback?: (err: Error | null, value: string | object) => void, - ): void; - - abstract removexattr( - path: string, - name: string, - callback?: (err: Error | null) => void, - ): void; - - abstract fremovexattr( - fd: AnuraFD, - name: string, - callback?: (err: Error | null) => void, - ): void; - /* * Asynchronous FS operations */ @@ -290,7 +236,6 @@ abstract class AnuraFSOperations { access(path: string, mode?: number): Promise; chown(path: string, uid: number, gid: number): Promise; chmod(path: string, mode: number): Promise; - getxattr(path: string, name: string): Promise; link(srcPath: string, dstPath: string): Promise; lstat(path: string): Promise; mkdir(path: string, mode?: number): Promise; @@ -310,15 +255,8 @@ abstract class AnuraFSOperations { ): Promise; readFile(path: string): Promise; readlink(path: string): Promise; - removexattr(path: string, name: string): Promise; rename(oldPath: string, newPath: string): Promise; rmdir(path: string): Promise; - setxattr( - path: string, - name: string, - value: string | object, - flag?: "CREATE" | "REPLACE", - ): Promise; stat(path: string): Promise; symlink(srcPath: string, dstPath: string, type?: string): Promise; truncate(path: string, len: number): Promise; @@ -1085,10 +1023,6 @@ class AnuraFilesystem implements AnuraFSOperations { this.processPath(path).unlink(path, callback); } - mknod(path: string, mode: number, callback?: (err: Error | null) => void) { - this.processPath(path).mknod(path, mode, callback); - } - rmdir(path: string, callback?: (err: Error | null) => void) { this.processPath(path).rmdir(path, callback); } @@ -1230,41 +1164,6 @@ class AnuraFilesystem implements AnuraFSOperations { this.processPath(path).appendFile(path, data, callback); } - setxattr(path: string, ...rest: any[]) { - // @ts-ignore - Overloaded methods are scary - this.processPath(path).setxattr(path, ...rest); - } - - fsetxattr(fd: AnuraFD, ...rest: any[]) { - // @ts-ignore - Overloaded methods are scary - this.processFD(fd).fsetxattr(fd, ...rest); - } - - getxattr( - path: string, - name: string, - callback?: (err: Error | null, value: string | object) => void, - ) { - this.processPath(path).getxattr(path, name, callback); - } - - fgetxattr(fd: AnuraFD, ...rest: any[]) { - // @ts-ignore - Overloaded methods are scary - this.processFD(fd).fgetxattr(fd, ...rest); - } - - removexattr( - path: string, - name: string, - callback?: (err: Error | null) => void, - ) { - this.processPath(path).removexattr(path, name, callback); - } - - fremovexattr(fd: AnuraFD, ...rest: any[]) { - // @ts-ignore - Overloaded methods are scary - this.processFD(fd).fremovexattr(fd, ...rest); - } // @ts-ignore - This is still being implemented. promises = { appendFile: ( @@ -1288,8 +1187,6 @@ class AnuraFilesystem implements AnuraFSOperations { this.processPath(path).promises.chown(path, uid, gid), chmod: (path: string, mode: number) => this.processPath(path).promises.chmod(path, mode), - getxattr: (path: string, name: string) => - this.processPath(path).promises.getxattr(path, name), link: (srcPath: string, dstPath: string) => this.processPath(srcPath).promises.link(srcPath, dstPath), lstat: (path: string) => this.processPath(path).promises.lstat(path), @@ -1297,8 +1194,6 @@ class AnuraFilesystem implements AnuraFSOperations { this.processPath(path).promises.mkdir(path, mode), mkdtemp: (prefix: string, options?: { encoding: string }) => this.providers.get("/")!.promises.mkdtemp(prefix, options), - mknod: (path: string, mode: number) => - this.processPath(path).promises.mknod(path, mode), open: async ( path: string, flags: "r" | "r+" | "w" | "w+" | "a" | "a+", @@ -1312,17 +1207,9 @@ class AnuraFilesystem implements AnuraFSOperations { this.processPath(path).promises.readFile(path), readlink: (path: string) => this.processPath(path).promises.readlink(path), - removexattr: (path: string, name: string) => - this.processPath(path).promises.removexattr(path, name), rename: (oldPath: string, newPath: string) => this.processPath(oldPath).promises.rename(oldPath, newPath), rmdir: (path: string) => this.processPath(path).promises.rmdir(path), - setxattr: ( - path: string, - name: string, - value: string | object, - flag?: "CREATE" | "REPLACE", - ) => this.processPath(path).promises.setxattr(path, name, value, flag), stat: (path: string) => this.processPath(path).promises.stat(path), symlink: (srcPath: string, dstPath: string, type?: string) => this.processPath(srcPath).promises.symlink(srcPath, dstPath, type), diff --git a/src/api/LocalFS.ts b/src/api/LocalFS.ts index 253c7dde..7f4b24df 100644 --- a/src/api/LocalFS.ts +++ b/src/api/LocalFS.ts @@ -427,10 +427,6 @@ class LocalFS extends AFSProvider { this.stats.set(path, currStats); await this.promises.saveStats(); }, - getxattr: () => { - console.error("Not implemented: getxattr"); - throw new Error("Not implemented"); - }, link: () => { console.error("Not implemented: link"); throw new Error("Not implemented"); @@ -472,14 +468,6 @@ class LocalFS extends AFSProvider { console.error("Not implemented: readlink"); throw new Error("Not implemented"); }, - removexattr: () => { - console.error("Not implemented: removexattr"); - throw new Error("Not implemented"); - }, - setxattr: () => { - console.error("Not implemented: setxattr"); - throw new Error("Not implemented"); - }, symlink: () => { console.error("Not implemented: symlink"); throw new Error("Not implemented"); @@ -646,36 +634,6 @@ class LocalFS extends AFSProvider { throw new Error("Method not implemented."); } - setxattr() { - console.error("Not implemented: setxattr"); - throw new Error("Method not implemented."); - } - - fsetxattr() { - console.error("Not implemented: fsetxattr"); - throw new Error("Method not implemented."); - } - - getxattr() { - console.error("Not implemented: getxattr"); - throw new Error("Method not implemented."); - } - - fgetxattr() { - console.error("Not implemented: fgetxattr"); - throw new Error("Method not implemented."); - } - - removexattr() { - console.error("Not implemented: removexattr"); - throw new Error("Method not implemented."); - } - - fremovexattr() { - console.error("Not implemented: fremovexattr"); - throw new Error("Method not implemented."); - } - utimes() { console.error("Not implemented: utimes"); throw new Error("Method not implemented.");