diff options
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_fsync.ts')
-rw-r--r-- | ext/node/polyfills/_fs/_fs_fsync.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/node/polyfills/_fs/_fs_fsync.ts b/ext/node/polyfills/_fs/_fs_fsync.ts new file mode 100644 index 000000000..02be24abc --- /dev/null +++ b/ext/node/polyfills/_fs/_fs_fsync.ts @@ -0,0 +1,13 @@ +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. +import { CallbackWithError } from "internal:deno_node/polyfills/_fs/_fs_common.ts"; + +export function fsync( + fd: number, + callback: CallbackWithError, +) { + Deno.fsync(fd).then(() => callback(null), callback); +} + +export function fsyncSync(fd: number) { + Deno.fsyncSync(fd); +} |