Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/node-core-library > FileSystem > readFolderItemNames

FileSystem.readFolderItemNames() method

Reads the names of folder entries, not including "." or "..". Behind the scenes it uses fs.readdirSync().

Signature:

static readFolderItemNames(folderPath: string, options?: IFileSystemReadFolderOptions): string[];

Parameters

ParameterTypeDescription
folderPathstringThe absolute or relative path to the folder which should be read.
optionsIFileSystemReadFolderOptions(Optional) Optional settings that can change the behavior. Type: IReadFolderOptions

Returns:

string[]