Skip to content

Expose internal statValues in a consumer friendly way. #19167

Description

@jdalton

The fs.stat and fs.statSync methods have access to an internal statValues typed array which holds things like raw mtimeMs values. It would be nice to avoid creating an entire stats object for one-off things like mtimeMs and friends.

Since Node is already tracking these values in a way that makes it easy to pluck them individually what do you all think about splitting each value out into their own method which then accesses the internal statValues array instead of creating a catch-all for all-values as the stat methods do today?

Related: This would also nicely side step the perf issue associated with stat too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues requesting new Node.js features.fsIssues and PRs related to file-system APIs and the fs module.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.wontfixIssues that will not be fixed.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions