mirror of
https://github.com/denoland/deno.git
synced 2025-03-04 01:44:26 -05:00
docs: readTextFile / readTextFileSync throw when reading directory (#7999)
This commit is contained in:
parent
e58763737e
commit
e432db70e9
1 changed files with 2 additions and 2 deletions
4
cli/dts/lib.deno.ns.d.ts
vendored
4
cli/dts/lib.deno.ns.d.ts
vendored
|
@ -1226,7 +1226,7 @@ declare namespace Deno {
|
||||||
export function rename(oldpath: string, newpath: string): Promise<void>;
|
export function rename(oldpath: string, newpath: string): Promise<void>;
|
||||||
|
|
||||||
/** Synchronously reads and returns the entire contents of a file as utf8
|
/** Synchronously reads and returns the entire contents of a file as utf8
|
||||||
* encoded string. Reading a directory returns an empty string.
|
* encoded string. Reading a directory throws an error.
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* const data = Deno.readTextFileSync("hello.txt");
|
* const data = Deno.readTextFileSync("hello.txt");
|
||||||
|
@ -1237,7 +1237,7 @@ declare namespace Deno {
|
||||||
export function readTextFileSync(path: string | URL): string;
|
export function readTextFileSync(path: string | URL): string;
|
||||||
|
|
||||||
/** Asynchronously reads and returns the entire contents of a file as utf8
|
/** Asynchronously reads and returns the entire contents of a file as utf8
|
||||||
* encoded string. Reading a directory returns an empty string.
|
* encoded string. Reading a directory throws an error.
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* const data = await Deno.readTextFile("hello.txt");
|
* const data = await Deno.readTextFile("hello.txt");
|
||||||
|
|
Loading…
Add table
Reference in a new issue