Repository navigation
fs: implement lutimes - #33399
fs: implement lutimes#33399arcanis wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
It'd be nicer to share this code with UTimes(). The JS bindings too, although that's not as much code.
The FS_SYNC_TRACE_BEGIN/FS_SYNC_TRACE_END labels are off, by the way.
There was a problem hiding this comment.
I tried to keep roughly the same pattern as for lchown and lchmod, which are both duplicated similarly.
Will update the traces 👍
There was a problem hiding this comment.
Yes, but remember the rule of three: duplicating something once? Probably okay. Duplicating it twice? Time to refactor.
There was a problem hiding this comment.
We should explain what this method does here and link to the man page for lutimes. I think taking the description from the manual page should be fine:
fs.lutimes() changes the access and modification times of a file in the same way as fs.utimes, with the difference that if filename refers to a symbolic link, then the link is not dereferenced: instead, the timestamps of the symbolic link are changed.
Or something similar - and other references (like the synchronous version) should reference the decsription.
left a comment
There was a problem hiding this comment.
Hey thank you for this. Not blocking on this and I am thankful for this PR :]
I would really prefer it if we:
- Addressed the docs issues and improve the documentation before landing so users understand this.
- Add more tests that cover the entire API surface (passing invalid mtimes and modes looked checked but what about passing a url as path? etc)
commented
May 14, 2020
|
Docs look much better now (tests could still use some love) |
commented
May 14, 2020
commented
May 14, 2020
|
@arcanis BUILDING.md#building-nodejs-1 mentions the script in |
commented
May 14, 2020
|
I use that firewall script. It does the trick of stopping those popups. My only issue with it has been that you occasionally need to re-run it. |
commented
May 19, 2020
|
@arcanis Can you remove the merge commit and rebase instead? Merge conflicts break our CI. Otherwise this should be good to go 👍 |
commented
May 27, 2020
|
Ping @arcanis |
8ae28ff to
2935f72
Compare
|
If this should be landed on Node 12.x, it needs a manual backport Edit: nvm, the conflicts are so small I did it directly: #35320 |

Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesThe FS API is currently lacking support for
utimes, which makes it difficult to implement perfect copy mechanisms (since we can't ensure that we'll be able to preserve the atime/mtime from the original file). This got recently fixed in libuv (libuv/libuv@bd42923), and this PR adds the required binding.