summaryrefslogtreecommitdiff
path: root/ext/fs/30_fs.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fs/30_fs.js')
-rw-r--r--ext/fs/30_fs.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/fs/30_fs.js b/ext/fs/30_fs.js
index 3c888f1f1..6923741ee 100644
--- a/ext/fs/30_fs.js
+++ b/ext/fs/30_fs.js
@@ -576,10 +576,20 @@ async function fdatasync(rid) {
}
function fsyncSync(rid) {
+ internals.warnOnDeprecatedApi(
+ "Deno.fsyncSync()",
+ new Error().stack,
+ "Use `file.syncSync()` instead.",
+ );
op_fs_fsync_sync(rid);
}
async function fsync(rid) {
+ internals.warnOnDeprecatedApi(
+ "Deno.fsync()",
+ new Error().stack,
+ "Use `file.sync()` instead.",
+ );
await op_fs_fsync_async(rid);
}
@@ -739,6 +749,14 @@ class FsFile {
return this.#writable;
}
+ async sync() {
+ await op_fs_fsync_async(this.rid);
+ }
+
+ syncSync() {
+ op_fs_fsync_sync(this.rid);
+ }
+
[SymbolDispose]() {
core.tryClose(this.rid);
}