summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/_fs/_fs_writeFile.ts
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-01-24 23:36:35 +1100
committerGitHub <noreply@github.com>2024-01-24 13:36:35 +0100
commitaac0ad32bd589394316223f75e6f511331ff124c (patch)
tree695507e2303a3edc9920c4be2bbf06055581f8d2 /ext/node/polyfills/_fs/_fs_writeFile.ts
parentc98ab51746776397502df089706c8bb6946882ff (diff)
feat: deprecate `Deno.FsFile` constructor and `Deno.FsFile.rid` (#22072)
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_writeFile.ts')
-rw-r--r--ext/node/polyfills/_fs/_fs_writeFile.ts5
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