Interface FSOption

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.

  • lstatSync
  • readdir (callback withFileTypes Dirent variant, used for readdirCB and most walks)
  • readdirSync
  • readlinkSync
  • realpathSync
  • promises: Object containing the following async methods:
    • lstat
    • readdir (Dirent variant only)
    • readlink
    • realpath
interface FSOption {
    lstatSync?: ((path: string) => Stats);
    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;
    };
    readdir?: ((path: string, options: {
        withFileTypes: true;
    }, cb: ((er: null | ErrnoException, entries?: Dirent[]) => any)) => void);
    readdirSync?: ((path: string, options: {
        withFileTypes: true;
    }) => Dirent[]);
    readlinkSync?: ((path: string) => string);
    realpathSync?: ((path: string) => string);
    [k: string]: any;
}

Indexable

  • [k: string]: any

Properties

lstatSync?: ((path: string) => Stats)
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;
}
readdir?: ((path: string, options: {
    withFileTypes: true;
}, cb: ((er: null | ErrnoException, entries?: Dirent[]) => any)) => void)
readdirSync?: ((path: string, options: {
    withFileTypes: true;
}) => Dirent[])
readlinkSync?: ((path: string) => string)
realpathSync?: ((path: string) => string)