diff options
author | Casper Beyer <caspervonb@pm.me> | 2020-06-21 21:29:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-21 09:29:44 -0400 |
commit | 40866d7cd521a2f33ac60d841e1706c2f68ecc66 (patch) | |
tree | a0876c5dd3d63b814490a4a0ca6c511580e2170c /cli/js/ops/fs | |
parent | f24aab81c9c97fe933a9c6d9a02fbc70df60af37 (diff) |
feat(unstable): add Deno.fsyncSync and fsync (#6411)
Diffstat (limited to 'cli/js/ops/fs')
-rw-r--r-- | cli/js/ops/fs/sync.ts | 10 |
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 }); +} |