summaryrefslogtreecommitdiff
path: root/cli/js/ops/fs
diff options
context:
space:
mode:
authorCasper Beyer <caspervonb@pm.me>2020-06-26 20:36:35 +0800
committerGitHub <noreply@github.com>2020-06-26 08:36:35 -0400
commite278c90d8a32f5b9e382956234cfd84b651e98d8 (patch)
treefa881249f293c882a15fceb1b8f8a1421348b13a /cli/js/ops/fs
parented0b1d462718166143b67056c36c7db15cc736d7 (diff)
feat(unstable): add Deno.fdatasyncSync and fdatasync (#6403)
Diffstat (limited to 'cli/js/ops/fs')
-rw-r--r--cli/js/ops/fs/sync.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/js/ops/fs/sync.ts b/cli/js/ops/fs/sync.ts
index 5d5de7242..567aab55b 100644
--- a/cli/js/ops/fs/sync.ts
+++ b/cli/js/ops/fs/sync.ts
@@ -1,6 +1,14 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { sendSync, sendAsync } from "../dispatch_json.ts";
+export function fdatasyncSync(rid: number): void {
+ sendSync("op_fdatasync", { rid });
+}
+
+export async function fdatasync(rid: number): Promise<void> {
+ await sendAsync("op_fdatasync", { rid });
+}
+
export function fsyncSync(rid: number): void {
sendSync("op_fsync", { rid });
}