diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-01-25 03:26:49 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-24 17:26:49 +0100 |
commit | f5097d9d3b62f7dc8e29e85e12f6a6f2858addbf (patch) | |
tree | 63a828e08571bf8bbde3e341e48392c91bf645fe /ext/fs/30_fs.js | |
parent | 6b5c9764ac8087d035ef6a3f2542bd089957035e (diff) |
feat: `Deno.FsFile.{utime,utimeSync}()` and deprecate `Deno.{futime,futimeSync}` (#22070)
For removal in Deno v2.
---------
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'ext/fs/30_fs.js')
-rw-r--r-- | ext/fs/30_fs.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/fs/30_fs.js b/ext/fs/30_fs.js index 810089950..2136d88f6 100644 --- a/ext/fs/30_fs.js +++ b/ext/fs/30_fs.js @@ -752,6 +752,14 @@ class FsFile { op_fs_fsync_sync(this.#rid); } + async utime(atime, mtime) { + await futime(this.#rid, atime, mtime); + } + + utimeSync(atime, mtime) { + futimeSync(this.#rid, atime, mtime); + } + [SymbolDispose]() { core.tryClose(this.#rid); } |