diff options
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_writeFile.ts')
-rw-r--r-- | ext/node/polyfills/_fs/_fs_writeFile.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/node/polyfills/_fs/_fs_writeFile.ts b/ext/node/polyfills/_fs/_fs_writeFile.ts index a72d49147..fd573147b 100644 --- a/ext/node/polyfills/_fs/_fs_writeFile.ts +++ b/ext/node/polyfills/_fs/_fs_writeFile.ts @@ -1,6 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. import { Encodings } from "ext:deno_node/_utils.ts"; -import { fromFileUrl } from "ext:deno_node/path.ts"; +import { pathFromURL } from "ext:deno_web/00_infra.js"; import { Buffer } from "ext:deno_node/buffer.ts"; import { CallbackWithError, @@ -41,7 +41,7 @@ export function writeFile( throw new TypeError("Callback must be a function."); } - pathOrRid = pathOrRid instanceof URL ? fromFileUrl(pathOrRid) : pathOrRid; + pathOrRid = pathOrRid instanceof URL ? pathFromURL(pathOrRid) : pathOrRid; const flag: string | undefined = isFileOptions(options) ? options.flag @@ -107,7 +107,7 @@ export function writeFileSync( data: string | Uint8Array | Object, options?: Encodings | WriteFileOptions, ) { - pathOrRid = pathOrRid instanceof URL ? fromFileUrl(pathOrRid) : pathOrRid; + pathOrRid = pathOrRid instanceof URL ? pathFromURL(pathOrRid) : pathOrRid; const flag: string | undefined = isFileOptions(options) ? options.flag |