1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-26 16:09:27 -05:00

docs: readTextFile / readTextFileSync throw when reading directory (#7999)

This commit is contained in:
vwkd 2020-10-19 15:06:04 +02:00 committed by GitHub
parent e58763737e
commit e432db70e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1226,7 +1226,7 @@ declare namespace Deno {
export function rename(oldpath: string, newpath: string): Promise<void>;
/** 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
* const data = Deno.readTextFileSync("hello.txt");
@ -1237,7 +1237,7 @@ declare namespace Deno {
export function readTextFileSync(path: string | URL): string;
/** 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
* const data = await Deno.readTextFile("hello.txt");