-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide access to file system times with nanoseconds resolution #8276
Comments
If there isn't one already, you can write your own bindings for uv_fs_stat/uv_fs_fstat/uv_fs_lstat. That is what node.js itself uses and they support nanosecond resolution on file systems that support them and with the usual caveats. Adding nanoseconds to It might be possible to do something clever with interceptors and create values lazily but that would have to be benchmarked very carefully. |
The performance impact is to copy 4 C long to ECMAScript number fs.*utimes() api needs update, too
|
With all due respect but that comment betrays a certain ignorance of node's and V8's inner workings. |
Both nanoseconds (kernel 2.6) and birth date (ext4) predates Node.js These fs api calls should not have been designed this way in the first place. They knowingly lack file system features. The design of fs.*utimes does not adhere to good software engineering practices. Additional constructive suggestions would be great! |
I already provided one:
|
In #12607 we are considering exposing the raw numbers in addition to the |
* convert ’ to ' to turn md file to ASCII Fixes: nodejs#8276 Refs: nodejs#12607 Refs: nodejs#12818 Refs: nodejs#13256
PR-URL: nodejs#13173 Fixes: nodejs#8276 Refs: nodejs#12607 Refs: nodejs#12818 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Brian White <mscdex@mscdex.net>
Node.js should provide nanosecond time values in the fs.stat() response structure similar to how process.hrtime() does it.
If there is a module or trick to provide ns I would be happy to use that
Generally on Linux, human readable stat provides the nanoseconds, and epoch time provides the UTC second-level value. The combination is complete. Since Node.js uses ECMAScript Date objects, there is only millisecond resolution.
Here's Linux human readable
I have some utilities moving large data around that uses recursive md5 and metadata before-after to verify integrity
The text was updated successfully, but these errors were encountered: