Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaël Nison <nison.mael@gmail.com>2020-05-14 12:54:00 +0300
committergengjiawen <technicalcute@gmail.com>2020-06-23 12:14:28 +0300
commite202df8e4b1f5aee1c9b04996807bae942723a2f (patch)
tree2be3b7d987ded6ac35c910d77fa06a838940c0c8 /lib/internal/fs
parent86cbad837b3a0df8d291cde52a7a65c373e10707 (diff)
fs: implement lutimes
PR-URL: https://github.com/nodejs/node/pull/33399 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Diffstat (limited to 'lib/internal/fs')
-rw-r--r--lib/internal/fs/promises.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js
index 717b26e59fa..8a9c292056c 100644
--- a/lib/internal/fs/promises.js
+++ b/lib/internal/fs/promises.js
@@ -510,6 +510,14 @@ async function futimes(handle, atime, mtime) {
return binding.futimes(handle.fd, atime, mtime, kUsePromises);
}
+async function lutimes(path, atime, mtime) {
+ path = getValidatedPath(path);
+ return binding.lutimes(pathModule.toNamespacedPath(path),
+ toUnixTimestamp(atime),
+ toUnixTimestamp(mtime),
+ kUsePromises);
+}
+
async function realpath(path, options) {
options = getOptions(options, {});
path = getValidatedPath(path);
@@ -582,6 +590,7 @@ module.exports = {
lchown,
chown,
utimes,
+ lutimes,
realpath,
mkdtemp,
writeFile,