/// import * as _fs from 'fs'; declare function copy(src: string, dist: string, opts?: { /** return true will skip */ skip?: (file: string, stat: _fs.Stats) => Promise | boolean | void; /** override if exists, default is true */ override?: boolean; }): Promise; export declare type WatchDirHandler = (event: string, filename: string) => void; export declare type WatchDirOptions = { persistent?: boolean; /** ms, default 300 */ throttle?: number; }; declare function watchDir(dir: string, cb: WatchDirHandler): void; declare function watchDir(dir: string, options: WatchDirOptions, cb: WatchDirHandler): void; export declare const fs: { access: typeof _fs.access.__promisify__; open: typeof _fs.open.__promisify__; rename: typeof _fs.rename.__promisify__; truncate: typeof _fs.truncate.__promisify__; rmdir: typeof _fs.rmdir.__promisify__; mkdir: typeof _fs.mkdir.__promisify__; readdir: typeof _fs.readdir.__promisify__; readlink: typeof _fs.readlink.__promisify__; symlink: typeof _fs.symlink.__promisify__; lstat: typeof _fs.lstat.__promisify__; stat: typeof _fs.stat.__promisify__; link: (arg1: _fs.PathLike, arg2: _fs.PathLike) => Promise; unlink: typeof _fs.unlink.__promisify__; chmod: typeof _fs.chmod.__promisify__; chown: typeof _fs.chown.__promisify__; utimes: typeof _fs.utimes.__promisify__; realpath: typeof _fs.realpath.__promisify__; mkdtemp: typeof _fs.mkdtemp.__promisify__; writeFile: typeof _fs.writeFile.__promisify__; appendFile: typeof _fs.appendFile.__promisify__; readFile: typeof _fs.readFile.__promisify__; existsSync: typeof _fs.existsSync; createReadString: typeof _fs.createReadStream; createWriteStream: typeof _fs.createWriteStream; constants: typeof _fs.constants; watchDir: typeof watchDir; copy: typeof copy; exists(path: _fs.PathLike): Promise; /** exists via lstat, if a symbolic link's target file doesn't exists, `fs.exists` will return false, but `fs.lexists` will return true. */ lexists(path: _fs.PathLike): Promise; isFile(path: _fs.PathLike): Promise; isDirectory(path: _fs.PathLike): Promise; isSymbolicLink(path: _fs.PathLike): Promise; copyFile: typeof _fs.copyFile.__promisify__ | ((src: _fs.PathLike, dist: _fs.PathLike) => Promise<{}>); /** * Make directory with parents, like `mkdir -p` * @param dir */ mkdirp(dir: string): Promise; /** * Make directory with parents, like `mkdir -p` * @param dir */ mkdirpSync(dir: string): void; /** * Remove file or directory recursively, like `rm -rf` * @param path The path to remove * @param opts Options */ rmrf(path: string): Promise; outputFile(path: string, data: any, options?: string | { encoding?: string | null | undefined; mode?: string | number | undefined; flag?: string | undefined; } | null | undefined): Promise; outputFileSync(path: string, data: any, options?: string | { encoding?: string | null | undefined; mode?: string | number | undefined; flag?: string | undefined; } | null | undefined): void; outputJson(path: string, data: object, options?: string | { encoding?: string | null | undefined; mode?: string | number | undefined; flag?: string | undefined; space?: number | undefined; replacer?: ((key: string, value: any) => any) | undefined; } | null | undefined): Promise; outputJsonSync(path: string, data: any, options?: string | { encoding?: string | null | undefined; mode?: string | number | undefined; flag?: string | undefined; space?: number | undefined; replacer?: ((key: string, value: any) => any) | undefined; } | null | undefined): void; readJson(path: string, options?: { encoding?: null | undefined; flag?: string | undefined; } | null | undefined): Promise; readJsonSync(path: string, options?: { encoding?: null | undefined; flag?: string | undefined; } | null | undefined): T; iter(dir: string, skip: (path: string, stat: _fs.Stats) => boolean | void | Promise): Promise; renameSync(oldPath: _fs.PathLike, newPath: _fs.PathLike): void; truncateSync(path: _fs.PathLike, len?: number | null | undefined): void; ftruncate: typeof _fs.ftruncate; ftruncateSync(fd: number, len?: number | null | undefined): void; chownSync(path: _fs.PathLike, uid: number, gid: number): void; fchown: typeof _fs.fchown; fchownSync(fd: number, uid: number, gid: number): void; lchown: typeof _fs.lchown; lchownSync(path: _fs.PathLike, uid: number, gid: number): void; chmodSync(path: _fs.PathLike, mode: string | number): void; fchmod: typeof _fs.fchmod; fchmodSync(fd: number, mode: string | number): void; lchmod: typeof _fs.lchmod; lchmodSync(path: _fs.PathLike, mode: string | number): void; statSync(path: _fs.PathLike): _fs.Stats; fstat: typeof _fs.fstat; fstatSync(fd: number): _fs.Stats; lstatSync(path: _fs.PathLike): _fs.Stats; linkSync(existingPath: _fs.PathLike, newPath: _fs.PathLike): void; symlinkSync(target: _fs.PathLike, path: _fs.PathLike, type?: "dir" | "file" | "junction" | null | undefined): void; readlinkSync(path: _fs.PathLike, options?: "ascii" | "utf8" | "utf16le" | "ucs2" | "base64" | "latin1" | "binary" | "hex" | { encoding?: "ascii" | "utf8" | "utf16le" | "ucs2" | "base64" | "latin1" | "binary" | "hex" | null | undefined; } | null | undefined): string; readlinkSync(path: _fs.PathLike, options: "buffer" | { encoding: "buffer"; }): Buffer; readlinkSync(path: _fs.PathLike, options?: string | { encoding?: string | null | undefined; } | null | undefined): string | Buffer; realpathSync: typeof _fs.realpathSync; unlinkSync(path: _fs.PathLike): void; rmdirSync(path: _fs.PathLike): void; mkdirSync(path: _fs.PathLike, options?: string | number | _fs.MakeDirectoryOptions | null | undefined): void; mkdtempSync(prefix: string, options?: "ascii" | "utf8" | "utf16le" | "ucs2" | "base64" | "latin1" | "binary" | "hex" | { encoding?: "ascii" | "utf8" | "utf16le" | "ucs2" | "base64" | "latin1" | "binary" | "hex" | null | undefined; } | null | undefined): string; mkdtempSync(prefix: string, options: "buffer" | { encoding: "buffer"; }): Buffer; mkdtempSync(prefix: string, options?: string | { encoding?: string | null | undefined; } | null | undefined): string | Buffer; readdirSync(path: _fs.PathLike, options?: "ascii" | "utf8" | "utf16le" | "ucs2" | "base64" | "latin1" | "binary" | "hex" | { encoding: "ascii" | "utf8" | "utf16le" | "ucs2" | "base64" | "latin1" | "binary" | "hex" | null; withFileTypes?: false | undefined; } | null | undefined): string[]; readdirSync(path: _fs.PathLike, options: "buffer" | { encoding: "buffer"; withFileTypes?: false | undefined; }): Buffer[]; readdirSync(path: _fs.PathLike, options?: string | { encoding?: string | null | undefined; withFileTypes?: false | undefined; } | null | undefined): string[] | Buffer[]; readdirSync(path: _fs.PathLike, options: { withFileTypes: true; }): _fs.Dirent[]; close: typeof _fs.close; closeSync(fd: number): void; openSync(path: _fs.PathLike, flags: string | number, mode?: string | number | null | undefined): number; utimesSync(path: _fs.PathLike, atime: string | number | Date, mtime: string | number | Date): void; futimes: typeof _fs.futimes; futimesSync(fd: number, atime: string | number | Date, mtime: string | number | Date): void; fsync: typeof _fs.fsync; fsyncSync(fd: number): void; write: typeof _fs.write; writeSync(fd: number, buffer: _fs.BinaryData, offset?: number | null | undefined, length?: number | null | undefined, position?: number | null | undefined): number; writeSync(fd: number, string: any, position?: number | null | undefined, encoding?: string | null | undefined): number; read: typeof _fs.read; readSync(fd: number, buffer: _fs.BinaryData, offset: number, length: number, position: number | null): number; readFileSync(path: string | number | Buffer | import("url").URL, options?: { encoding?: null | undefined; flag?: string | undefined; } | null | undefined): Buffer; readFileSync(path: string | number | Buffer | import("url").URL, options: string | { encoding: string; flag?: string | undefined; }): string; readFileSync(path: string | number | Buffer | import("url").URL, options?: string | { encoding?: string | null | undefined; flag?: string | undefined; } | null | undefined): string | Buffer; writeFileSync(path: string | number | Buffer | import("url").URL, data: any, options?: string | { encoding?: string | null | undefined; mode?: string | number | undefined; flag?: string | undefined; } | null | undefined): void; appendFileSync(file: string | number | Buffer | import("url").URL, data: any, options?: string | { encoding?: string | null | undefined; mode?: string | number | undefined; flag?: string | undefined; } | null | undefined): void; watchFile(filename: _fs.PathLike, options: { persistent?: boolean | undefined; interval?: number | undefined; } | undefined, listener: (curr: _fs.Stats, prev: _fs.Stats) => void): void; watchFile(filename: _fs.PathLike, listener: (curr: _fs.Stats, prev: _fs.Stats) => void): void; unwatchFile(filename: _fs.PathLike, listener?: ((curr: _fs.Stats, prev: _fs.Stats) => void) | undefined): void; watch(filename: _fs.PathLike, options: "ascii" | "utf8" | "utf16le" | "ucs2" | "base64" | "latin1" | "binary" | "hex" | { encoding?: "ascii" | "utf8" | "utf16le" | "ucs2" | "base64" | "latin1" | "binary" | "hex" | null | undefined; persistent?: boolean | undefined; recursive?: boolean | undefined; } | null | undefined, listener?: ((event: string, filename: string) => void) | undefined): _fs.FSWatcher; watch(filename: _fs.PathLike, options: "buffer" | { encoding: "buffer"; persistent?: boolean | undefined; recursive?: boolean | undefined; }, listener?: ((event: string, filename: Buffer) => void) | undefined): _fs.FSWatcher; watch(filename: _fs.PathLike, options: string | { encoding?: string | null | undefined; persistent?: boolean | undefined; recursive?: boolean | undefined; } | null, listener?: ((event: string, filename: string | Buffer) => void) | undefined): _fs.FSWatcher; watch(filename: _fs.PathLike, listener?: ((event: string, filename: string) => any) | undefined): _fs.FSWatcher; accessSync(path: _fs.PathLike, mode?: number | undefined): void; createReadStream(path: _fs.PathLike, options?: string | { flags?: string | undefined; encoding?: string | undefined; fd?: number | undefined; mode?: number | undefined; autoClose?: boolean | undefined; start?: number | undefined; end?: number | undefined; highWaterMark?: number | undefined; } | undefined): _fs.ReadStream; fdatasync: typeof _fs.fdatasync; fdatasyncSync(fd: number): void; copyFileSync(src: _fs.PathLike, dest: _fs.PathLike, flags?: number | undefined): void; Stats: typeof _fs.Stats; Dirent: typeof _fs.Dirent; ReadStream: typeof _fs.ReadStream; WriteStream: typeof _fs.WriteStream; promises: typeof _fs.promises; }; export {};