Rename readDir -> readdir (#4225)

This commit is contained in:
dubiousjim 2020-03-06 08:34:02 -05:00 committed by GitHub
parent afea9b2edd
commit 9a63902db5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 46 additions and 47 deletions

View file

@ -992,8 +992,8 @@ declare namespace Deno {
/** UNSTABLE: 'len' maybe should be 'length' or 'size'.
*
* A FileInfo describes a file and is returned by `stat`, `lstat`,
* `statSync`, `lstatSync`. A list of FileInfo is returned by `readDir`,
* `readDirSync`. */
* `statSync`, `lstatSync`. A list of FileInfo is returned by `readdir`,
* `readdirSync`. */
export interface FileInfo {
/** **UNSTABLE**: `.len` maybe should be `.length` or `.size`.
*
@ -1079,25 +1079,24 @@ declare namespace Deno {
// @url js/read_dir.d.ts
/** UNSTABLE: Unstable rename to readdirSync.
/** UNSTABLE: need to consider streaming case
*
/* Synchronously reads the directory given by `path` and returns an array of
* Synchronously reads the directory given by `path` and returns an array of
* `Deno.FileInfo`.
*
* const files = Deno.readDirSync("/");
* const files = Deno.readdirSync("/");
*
* Requires `allow-read` permission. */
export function readDirSync(path: string): FileInfo[];
export function readdirSync(path: string): FileInfo[];
/** UNSTABLE: Possibly rename to `.readdir()`. Maybe need to return an
* `AsyncIterable`.
/** UNSTABLE: Maybe need to return an `AsyncIterable`.
*
* Reads the directory given by `path` and resolves to an array of `Deno.FileInfo`.
*
* const files = await Deno.readDir("/");
* const files = await Deno.readdir("/");
*
* Requires `allow-read` permission. */
export function readDir(path: string): Promise<FileInfo[]>;
export function readdir(path: string): Promise<FileInfo[]>;
// @url js/copy_file.d.ts