Home > @microsoft/node-core-library > FileSystem > readFolder

FileSystem.readFolder() method

Reads the contents of the folder, not including “.” or “..”. Behind the scenes it uses fs.readdirSync().

Signature:

static readFolder(folderPath: string, options?: IFileSystemReadFolderOptions): Array<string>;

Parameters

Parameter Type Description
folderPath string The absolute or relative path to the folder which should be read.
options IFileSystemReadFolderOptions Optional settings that can change the behavior. Type: IReadFolderOptions

Returns:

Array<string>