summaryrefslogtreecommitdiff
path: root/cli/js/ops
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/ops')
-rw-r--r--cli/js/ops/fs/sync.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/js/ops/fs/sync.ts b/cli/js/ops/fs/sync.ts
new file mode 100644
index 000000000..5d5de7242
--- /dev/null
+++ b/cli/js/ops/fs/sync.ts
@@ -0,0 +1,10 @@
+// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
+import { sendSync, sendAsync } from "../dispatch_json.ts";
+
+export function fsyncSync(rid: number): void {
+ sendSync("op_fsync", { rid });
+}
+
+export async function fsync(rid: number): Promise<void> {
+ await sendAsync("op_fsync", { rid });
+}