Rush StackShopBlogEvents
Skip to main content

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

FileSystem.readFolderItems() method

Reads the contents of the folder, not including "." or "..", returning objects including the entry names and types. Behind the scenes it uses fs.readdirSync().

Signature:

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

Parameters

Parameter

Type

Description

folderPath

string

The absolute or relative path to the folder which should be read.

options

IFileSystemReadFolderOptions

(Optional) Optional settings that can change the behavior. Type: IReadFolderOptions

Returns:

FolderItem[]