Skip to content

readdir should have {type:'file'} option - should allow user to only retrieve files not folders etc #21804

Closed
@ORESoftware

Description

@ORESoftware

With this SO question in mind:

https://stackoverflow.com/questions/51333163/nodejs-readdir-only-find-files/51333279

I know that readdir is some c utitlity on Unix. It would be possibly more efficient for users to pre-filter with readdir instead of running lstatSync or statSync on each item from the array.

Is it possible for the lower level routines to filter things out efficiently before sending back?

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.fsIssues and PRs related to the fs subsystem / file system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions