-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
doc: fix type of atime/mtime #29666
doc: fix type of atime/mtime #29666
Conversation
* `atime` {integer} | ||
* `mtime` {integer} | ||
* `atime` {number|string|Date} | ||
* `mtime` {number|string|Date} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be best to keep integer
instead of number
. We might want to have a stricter validation here at some point. I am not sure what the behavior would be in case a decimal is used instead of an integer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case I think number
is more appropriate. Sorry for the trouble.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 22157ef
Landed in 16e47b9 |
PR-URL: #29666 Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #29666 Reviewed-By: Luigi Pinca <[email protected]>
It seems that
fs.unlinkSync
andfs.utimesSync
can acceptnumber
,Date
orstring
as same asfs.unlink
andfs.utimes
.node/lib/fs.js
Lines 1177 to 1196 in 3a2e75d
node/lib/fs.js
Lines 1189 to 1206 in 3a2e75d
Checklist