Skip to content

fs: readdir optionally returning type information

Rodrigo Muino Tomonari requested to merge github/fork/bengl/readdirtypes into master

readdir and readdirSync now have a "withFileTypes" option, which, when enabled, provides an array of DirectoryEntry objects, similar to Stats bjects, which have the filename and the type information.

Ref: https://github.com/nodejs/node/issues/15699

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading