fs: __module & __module & { copy: ((src: string,
dist: string,
opts?: { overwrite?: boolean; skip?: ((file: string,
stat: Stats) => boolean | void | Promise<boolean | void>); }) => Promise<void>); copyFile: ((src: PathLike,
dst: PathLike,
mode?: number) => Promise<void>) | ((src: PathLike,
dist: PathLike) => Promise<unknown>); watchDir: { (dir: string,
cb: WatchDirHandler): void; (dir: string,
options: WatchDirOptions,
cb: WatchDirHandler): void; }; exists(path: PathLike): Promise<boolean>; isDirectory(path: PathLike): Promise<boolean>; isFile(path: PathLike): Promise<boolean>; isSymbolicLink(path: PathLike): Promise<boolean>; iter(dir: string,
skip: ((path: string,
stat: Stats) => boolean | void | Promise<boolean | void>)): Promise<void>; lexists(path: PathLike): Promise<boolean>; mkdirp(dir: string): Promise<void>; mkdirpSync(dir: string): void; outputFile(path: string,
data: any,
options?: WriteOptions): Promise<void>; outputFileSync(path: string,
data: any,
options?: WriteOptions): void; outputJson(path: string,
data: object,
options?: { replacer?: ((key: string,
value: any) => any); space?: number; } & WriteOptions): Promise<void>; outputJsonSync(path: string,
data: any,
options?: { replacer?: ((key: string,
value: any) => any); space?: number; } & WriteOptions): void; readJson<T>(path: string,
options?: null | { encoding?: null; flag?: string; }): Promise<T>; readJsonSync<T>(path: string,
options?: null | { encoding?: null; flag?: string; }): T; rmrf(path: string): Promise<void>; } = ... Type declaration
copy: ((src: string, dist: string, opts?: {
overwrite?: boolean;
skip?: ((file: string, stat: Stats) => boolean | void | Promise<boolean | void>);
}) => Promise<void>)
- (src, dist, opts?): Promise<void>
Parameters
- src: string
- dist: string
Optional
opts: {
overwrite?: boolean;
skip?: ((file: string, stat: Stats) => boolean | void | Promise<boolean | void>);
}Optional
overwrite?: boolean
Optional
skip?: ((file: string, stat: Stats) => boolean | void | Promise<boolean | void>)
- (file, stat): boolean | void | Promise<boolean | void>
Returns boolean | void | Promise<boolean | void>
Returns Promise<void>
copyFile: ((src: PathLike, dst: PathLike, mode?: number) => Promise<void>) | ((src: PathLike, dist: PathLike) => Promise<unknown>)
- (dir, cb): void
Returns void
- (dir, options, cb): void
Returns void
exists:function
- exists(path): Promise<boolean>
Returns Promise<boolean>
isDirectory:function
- isDirectory(path): Promise<boolean>
Returns Promise<boolean>
isFile:function
- isFile(path): Promise<boolean>
Returns Promise<boolean>
isSymbolicLink:function
- isSymbolicLink(path): Promise<boolean>
Returns Promise<boolean>
iter:function
- iter(dir, skip): Promise<void>
Parameters
- dir: string
- skip: ((path: string, stat: Stats) => boolean | void | Promise<boolean | void>)
- (path, stat): boolean | void | Promise<boolean | void>
Returns boolean | void | Promise<boolean | void>
Returns Promise<void>
lexists:function
- lexists(path): Promise<boolean>
Returns Promise<boolean>
mkdirp:function
- mkdirp(dir): Promise<void>
Returns Promise<void>
mkdirpSync:function
- mkdirpSync(dir): void
Returns void
outputFile:function
- outputFile(path, data, options?): Promise<void>
Returns Promise<void>
outputFileSync:function
- outputFileSync(path, data, options?): void
Returns void
outputJson:function
- outputJson(path, data, options?): Promise<void>
Parameters
- path: string
- data: object
Optional
options: {
replacer?: ((key: string, value: any) => any);
space?: number;
} & WriteOptions
Returns Promise<void>
outputJsonSync:function
- outputJsonSync(path, data, options?): void
Parameters
- path: string
- data: any
Optional
options: {
replacer?: ((key: string, value: any) => any);
space?: number;
} & WriteOptions
Returns void
readJson:function
- readJson<T>(path, options?): Promise<T>
Parameters
- path: string
Optional
options: null | {
encoding?: null;
flag?: string;
}
Returns Promise<T>
readJsonSync:function
- readJsonSync<T>(path, options?): T
Parameters
- path: string
Optional
options: null | {
encoding?: null;
flag?: string;
}
Returns T
rmrf:function
- rmrf(path): Promise<void>
Returns Promise<void>
overwrite if exists, default is true