@saber2pr/nana
Version:
a http-server framework.
16 lines (15 loc) • 805 B
TypeScript
/// <reference types="node" />
export declare const isExist: (path: string) => Promise<boolean>;
export declare const pathBe: (path: string, type: "dir" | "file") => Promise<boolean>;
export declare const readDir: (dir: string) => Promise<string[]>;
export declare const search: (path: string, callback: (file: string) => void) => Promise<void>;
export declare const read: (path: string) => Promise<Buffer>;
export declare type read = typeof read;
export declare const write: (path: string, data: any) => Promise<void>;
export declare const fs: {
read: (path: string) => Promise<Buffer>;
write: (path: string, data: any) => Promise<void>;
pathBe: (path: string, type: "dir" | "file") => Promise<boolean>;
isExist: (path: string) => Promise<boolean>;
};
export declare type fs = typeof fs;