diff options
Diffstat (limited to 'ext/node/polyfills/_fs')
-rw-r--r-- | ext/node/polyfills/_fs/_fs_fsync.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/node/polyfills/_fs/_fs_fsync.ts b/ext/node/polyfills/_fs/_fs_fsync.ts index 489929227..942aecf6a 100644 --- a/ext/node/polyfills/_fs/_fs_fsync.ts +++ b/ext/node/polyfills/_fs/_fs_fsync.ts @@ -4,14 +4,15 @@ // deno-lint-ignore-file prefer-primordials import { CallbackWithError } from "ext:deno_node/_fs/_fs_common.ts"; +import { FsFile } from "ext:deno_fs/30_fs.js"; export function fsync( fd: number, callback: CallbackWithError, ) { - Deno.fsync(fd).then(() => callback(null), callback); + new FsFile(fd).sync().then(() => callback(null), callback); } export function fsyncSync(fd: number) { - Deno.fsyncSync(fd); + new FsFile(fd).syncSync(); } |