Properties
Optional
lstatSync
lstatSync?: ((path: string) => Stats)
Type declaration
-
- (path: string): Stats
-
Returns Stats
Optional
promises
promises?: {
lstat?: ((path: string) => Promise<Stats>);
readdir?: ((path: string, options: {
withFileTypes: true;
}) => Promise<Dirent[]>);
readlink?: ((path: string) => Promise<string>);
realpath?: ((path: string) => Promise<string>);
[k: string]: any;
}
Type declaration
-
[k: string]: any
-
Optional
lstat?: ((path: string) => Promise<Stats>)
-
- (path: string): Promise<Stats>
-
Returns Promise<Stats>
-
Optional
readdir?: ((path: string, options: {
withFileTypes: true;
}) => Promise<Dirent[]>)
-
- (path: string, options: {
withFileTypes: true;
}): Promise<Dirent[]>
-
Parameters
-
path: string
-
options: {
withFileTypes: true;
}
Returns Promise<Dirent[]>
-
Optional
readlink?: ((path: string) => Promise<string>)
-
- (path: string): Promise<string>
-
Returns Promise<string>
-
Optional
realpath?: ((path: string) => Promise<string>)
-
- (path: string): Promise<string>
-
Returns Promise<string>
Optional
readdir
readdir?: ((path: string, options: {
withFileTypes: true;
}, cb: ((er: null | ErrnoException, entries?: Dirent[]) => any)) => void)
Type declaration
-
- (path: string, options: {
withFileTypes: true;
}, cb: ((er: null | ErrnoException, entries?: Dirent[]) => any)): void
-
Parameters
-
path: string
-
options: {
withFileTypes: true;
}
-
cb: ((er: null | ErrnoException, entries?: Dirent[]) => any)
-
- (er: null | ErrnoException, entries?: Dirent[]): any
-
Parameters
-
er: null | ErrnoException
-
Optional
entries: Dirent[]
Returns any
Returns void
Optional
readdirSync
readdirSync?: ((path: string, options: {
withFileTypes: true;
}) => Dirent[])
Type declaration
-
- (path: string, options: {
withFileTypes: true;
}): Dirent[]
-
Parameters
-
path: string
-
options: {
withFileTypes: true;
}
Returns Dirent[]
Optional
readlinkSync
readlinkSync?: ((path: string) => string)
Type declaration
-
- (path: string): string
-
Returns string
Optional
realpathSync
realpathSync?: ((path: string) => string)
Type declaration
-
- (path: string): string
-
Returns string
An object that will be used to override the default
fs
methods. Any methods that are not overridden will use Node's built-in implementations.withFileTypes
Dirent variant, used for readdirCB and most walks)