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.
The
fs.statandfs.statSyncmethods have access to an internalstatValuestyped array which holds things like rawmtimeMsvalues. It would be nice to avoid creating an entire stats object for one-off things likemtimeMsand 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
statValuesarray 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
stattoo.