summaryrefslogtreecommitdiff
path: root/cli/rt/30_fs.js
diff options
context:
space:
mode:
Diffstat (limited to 'cli/rt/30_fs.js')
-rw-r--r--cli/rt/30_fs.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/cli/rt/30_fs.js b/cli/rt/30_fs.js
index d8171bdac..750c3c1ba 100644
--- a/cli/rt/30_fs.js
+++ b/cli/rt/30_fs.js
@@ -268,6 +268,32 @@
return v instanceof Date ? Math.trunc(v.valueOf() / 1000) : v;
}
+ function futimeSync(
+ rid,
+ atime,
+ mtime,
+ ) {
+ sendSync("op_futime_sync", {
+ rid,
+ // TODO(caspervonb) split atime, mtime into [seconds, nanoseconds] tuple
+ atime: toSecondsFromEpoch(atime),
+ mtime: toSecondsFromEpoch(mtime),
+ });
+ }
+
+ async function futime(
+ rid,
+ atime,
+ mtime,
+ ) {
+ await sendAsync("op_futime_async", {
+ rid,
+ // TODO(caspervonb) split atime, mtime into [seconds, nanoseconds] tuple
+ atime: toSecondsFromEpoch(atime),
+ mtime: toSecondsFromEpoch(mtime),
+ });
+ }
+
function utimeSync(
path,
atime,
@@ -364,6 +390,8 @@
umask,
link,
linkSync,
+ futime,
+ futimeSync,
utime,
utimeSync,
symlink,