diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-01-24 23:36:35 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-24 13:36:35 +0100 |
commit | aac0ad32bd589394316223f75e6f511331ff124c (patch) | |
tree | 695507e2303a3edc9920c4be2bbf06055581f8d2 /ext/node/polyfills/_fs/_fs_readFile.ts | |
parent | c98ab51746776397502df089706c8bb6946882ff (diff) |
feat: deprecate `Deno.FsFile` constructor and `Deno.FsFile.rid` (#22072)
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_readFile.ts')
-rw-r--r-- | ext/node/polyfills/_fs/_fs_readFile.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/node/polyfills/_fs/_fs_readFile.ts b/ext/node/polyfills/_fs/_fs_readFile.ts index 7e231d8ec..de1a2a30d 100644 --- a/ext/node/polyfills/_fs/_fs_readFile.ts +++ b/ext/node/polyfills/_fs/_fs_readFile.ts @@ -18,6 +18,7 @@ import { Encodings, TextEncodings, } from "ext:deno_node/_utils.ts"; +import { FsFile } from "ext:deno_fs/30_fs.js"; function maybeDecode(data: Uint8Array, encoding: TextEncodings): string; function maybeDecode( @@ -72,7 +73,7 @@ export function readFile( let p: Promise<Uint8Array>; if (path instanceof FileHandle) { - const fsFile = new Deno.FsFile(path.fd); + const fsFile = new FsFile(path.fd); p = readAll(fsFile); } else { p = Deno.readFile(path); |