The absolute path of the directory to read.
Read options with withMetadata: false.
An IOResult containing an array of directory entries without metadata.
readDirSync for the metadata-carrying overload
Synchronous version of readDir.
Reads the contents of a directory.
Note: Returns DirEntryLike[] instead of AsyncIterableIterator<DirEntry> because:
FileSystemHandle objects cannot be serialized across threads;
DirEntryLike uses FileSystemHandleLike which is JSON-serializablePass { withMetadata: false } to skip the per-file metadata lookup and get
DirEntrySlim[] instead, which keeps the response small when listing a large tree.
The absolute path of the directory to read.
Optionaloptions: ReadDirSyncOptions
Optional read options (e.g., recursive).
An IOResult containing an array of directory entries.
readDir for the async version.
Synchronous version of
readDir. Reads the contents of a directory without file metadata.Each entry carries only
pathandkind: no per-filegetFile()lookup is performed and the response stays small, which is what makes listing a large tree feasible. Read metadata with statSync when it is actually needed.