diff options
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_writeFile.ts')
-rw-r--r-- | ext/node/polyfills/_fs/_fs_writeFile.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/node/polyfills/_fs/_fs_writeFile.ts b/ext/node/polyfills/_fs/_fs_writeFile.ts index 47d5d38b4..40d368566 100644 --- a/ext/node/polyfills/_fs/_fs_writeFile.ts +++ b/ext/node/polyfills/_fs/_fs_writeFile.ts @@ -24,6 +24,7 @@ import { validateStringAfterArrayBufferView, } from "ext:deno_node/internal/fs/utils.mjs"; import { promisify } from "ext:deno_node/internal/util.mjs"; +import { FsFile } from "ext:deno_fs/30_fs.js"; interface Writer { write(p: Uint8Array): Promise<number>; @@ -73,7 +74,7 @@ export function writeFile( (async () => { try { file = isRid - ? new Deno.FsFile(pathOrRid as number) + ? new FsFile(pathOrRid as number) : await Deno.open(pathOrRid as string, openOptions); // ignore mode because it's not supported on windows @@ -138,7 +139,7 @@ export function writeFileSync( let error: Error | null = null; try { file = isRid - ? new Deno.FsFile(pathOrRid as number) + ? new FsFile(pathOrRid as number) : Deno.openSync(pathOrRid as string, openOptions); // ignore mode because it's not supported on windows |