Does fs.utimes
invoke utime()
or utimes()
?
#55989
Unanswered
jsumners-nr
asked this question in
General
Replies: 1 comment 2 replies
-
No, is using I'll try to build the backtrace for you. uv_fs_utime calls an Which ends on Linux in a
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a test against
fs.utimes
that is flaky. The test:fs.utimes
against that file to set specific accessed & modified timesfs.utimes
viafs.statSync
This test is flaking out by the accessed time occasionally, being set to an unexpected time (creation time of the temp file?), e.g.
1732540522.827 == 1732539600
.This comment #30212 (comment) is suggesting that, ultimately, the passed in times are being converted to nanosecond precision. But if I look at:
node/src/node_file.cc
Lines 2934 to 2965 in b17a1fb
it looks like Node.js will be invoking
utime()
instead ofutimes()
(at least, I think thatstatic void UTimes
function is what underliesfs.utimes
). According to https://linux.die.net/man/2/utimes, onlyutimes()
supports nanosecond precision.Is my finding correct? Or am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions