2024-05-07 16:20:15 +00:00
|
|
|
import type { Entity } from "./baseTypes";
|
2024-04-26 18:27:24 +00:00
|
|
|
|
|
|
|
export abstract class FakeFs {
|
|
|
|
abstract kind: string;
|
|
|
|
abstract walk(): Promise<Entity[]>;
|
2024-05-17 17:33:20 +00:00
|
|
|
abstract walkPartial(): Promise<Entity[]>;
|
2024-04-26 18:27:24 +00:00
|
|
|
abstract stat(key: string): Promise<Entity>;
|
|
|
|
abstract mkdir(key: string, mtime?: number, ctime?: number): Promise<Entity>;
|
|
|
|
abstract writeFile(
|
|
|
|
key: string,
|
|
|
|
content: ArrayBuffer,
|
|
|
|
mtime: number,
|
|
|
|
ctime: number
|
|
|
|
): Promise<Entity>;
|
|
|
|
abstract readFile(key: string): Promise<ArrayBuffer>;
|
2024-05-26 16:33:49 +00:00
|
|
|
abstract rename(key1: string, key2: string): Promise<void>;
|
2024-04-26 18:27:24 +00:00
|
|
|
abstract rm(key: string): Promise<void>;
|
|
|
|
abstract checkConnect(callbackFunc?: any): Promise<boolean>;
|
|
|
|
abstract getUserDisplayName(): Promise<string>;
|
|
|
|
abstract revokeAuth(): Promise<any>;
|
2024-05-08 14:37:29 +00:00
|
|
|
abstract allowEmptyFile(): boolean;
|
2024-04-26 18:27:24 +00:00
|
|
|
}
|