@devbookhq/sdk
Version:
SDK for managing Devbook sessions from JavaScript/TypeScript
17 lines (16 loc) • 724 B
TypeScript
import FilesystemWatcher from './filesystemWatcher';
export declare const filesystemService = "filesystem";
export interface FileInfo {
isDir: boolean;
name: string;
}
export interface FilesystemManager {
readonly write: (path: string, content: string) => Promise<void>;
readonly writeBytes: (path: string, content: Uint8Array) => Promise<void>;
readonly read: (path: string) => Promise<string>;
readonly readBytes: (path: string) => Promise<Uint8Array>;
readonly remove: (path: string) => Promise<void>;
readonly list: (path: string) => Promise<FileInfo[]>;
readonly makeDir: (path: string) => Promise<void>;
readonly watchDir: (path: string) => FilesystemWatcher;
}