mirror of
https://github.com/denoland/deno.git
synced 2025-07-24 05:35:33 +00:00
Rename readDir -> readdir (#4225)
This commit is contained in:
parent
afea9b2edd
commit
9a63902db5
13 changed files with 46 additions and 47 deletions
19
cli/js/lib.deno.ns.d.ts
vendored
19
cli/js/lib.deno.ns.d.ts
vendored
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue