UNPKG

@synet/fs

Version:

Robust, battle-tested filesystem abstraction for Node.js

16 lines (15 loc) 637 B
import type { FileStats, IAsyncFileSystem } from "./async-filesystem.interface"; /** * Node.js implementation of FileSystem interface */ export declare class NodeFileSystem implements IAsyncFileSystem { exists(path: string): Promise<boolean>; readFile(path: string): Promise<string>; writeFile(path: string, data: string): Promise<void>; deleteFile(path: string): Promise<void>; deleteDir(path: string): Promise<void>; ensureDir(dirPath: string): Promise<void>; readDir(dirPath: string): Promise<string[]>; chmod(path: string, mode: number): Promise<void>; stat(path: string): Promise<FileStats>; }