Function readDirectoryStatsSafe

  • Reads a fs.Stats of all FSO's (files/directories/etc.) in a directory. Each FSO's 'name' and full 'path' are available as lazy-evaluated getter properties on the returned Stats object. If the directory does not exist, returns undefined.

    Parameters

    • dirpath: string

      The path of the directory to read.

    Returns Promise<(fs.Stats & {
        name: string;
        get path(): string;
    })[] | undefined>

Generated using TypeDoc