Cleanup comments and internal variables (#4205)

This commit is contained in:
dubiousjim 2020-03-02 10:19:42 -05:00 committed by GitHub
parent 809019dc6e
commit 6cd46fa3ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 681 additions and 572 deletions

View file

@ -15,19 +15,23 @@ function res(response: ReadDirResponse): FileInfo[] {
);
}
/** Reads the directory given by path and returns a list of file info
* synchronously.
/** Synchronously reads the directory given by `path` and returns an array of
* `Deno.FileInfo`.
*
* const files = Deno.readDirSync("/");
*/
*
* Requires `allow-read` permission. */
export function readDirSync(path: string): FileInfo[] {
return res(sendSync("op_read_dir", { path }));
}
/** Reads the directory given by path and returns a list of file info.
/** 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("/");
*/
*
* Requires `allow-read` permission. */
export async function readDir(path: string): Promise<FileInfo[]> {
return res(await sendAsync("op_read_dir", { path }));
}