Unverified Commit f7049a20 authored by Joyee Cheung's avatar Joyee Cheung
Browse files

fs: refactor stats array to be more generic

- Pass kFsStatsFieldsLength between JS and C++ instead of using the
  magic number 14
- Pass the global stats array to the completion callback of
  asynchronous FSReqWrap similar to how the stats arrays are passed
  to the FSReqPromise resolvers
- Abstract the stats converter and take an offset to compute the
  old stats in fs.watchFile
- Use templates in node::FillStatsArray and FSReqPromise in preparation
  for BigInt intergration
- Put the global stat array filler in node_internals.h because it is
  shared by node_file.cc and node_stat_watcher.cc

PR-URL: https://github.com/nodejs/node/pull/19714


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 30fe55e2
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment