diff options
author | dubiousjim <dubiousjim@gmail.com> | 2020-03-02 10:19:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-02 10:19:42 -0500 |
commit | 6cd46fa3ef4b12f35a60f1a33c7f038c06b5fc71 (patch) | |
tree | e8ef21a936ebac529a7c8e87681123fbd225ff5f /cli/js/stat.ts | |
parent | 809019dc6e9a80843affc927fa7a52cd41e76471 (diff) |
Cleanup comments and internal variables (#4205)
Diffstat (limited to 'cli/js/stat.ts')
-rw-r--r-- | cli/js/stat.ts | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/cli/js/stat.ts b/cli/js/stat.ts index e742451fd..ea4ab1014 100644 --- a/cli/js/stat.ts +++ b/cli/js/stat.ts @@ -23,12 +23,13 @@ export interface StatResponse { blocks: number; } -/** Queries the file system for information on the path provided. If the given - * path is a symlink information about the symlink will be returned. +/** Resolves to a `Deno.FileInfo` for the specified path. If path is a + * symlink, information for the symlink will be returned. * * const fileInfo = await Deno.lstat("hello.txt"); * assert(fileInfo.isFile()); - */ + * + * Requires `allow-read` permission. */ export async function lstat(filename: string): Promise<FileInfo> { const res = (await sendAsync("op_stat", { filename, @@ -37,13 +38,13 @@ export async function lstat(filename: string): Promise<FileInfo> { return new FileInfoImpl(res); } -/** Queries the file system for information on the path provided synchronously. - * If the given path is a symlink information about the symlink will be - * returned. +/** Synchronously returns a `Deno.FileInfo` for the specified path. If + * path is a symlink, information for the symlink will be returned. * * const fileInfo = Deno.lstatSync("hello.txt"); * assert(fileInfo.isFile()); - */ + * + * Requires `allow-read` permission. */ export function lstatSync(filename: string): FileInfo { const res = sendSync("op_stat", { filename, @@ -52,12 +53,13 @@ export function lstatSync(filename: string): FileInfo { return new FileInfoImpl(res); } -/** Queries the file system for information on the path provided. `stat` Will - * always follow symlinks. +/** Resolves to a `Deno.FileInfo` for the specified path. Will always follow + * symlinks. * * const fileInfo = await Deno.stat("hello.txt"); * assert(fileInfo.isFile()); - */ + * + * Requires `allow-read` permission. */ export async function stat(filename: string): Promise<FileInfo> { const res = (await sendAsync("op_stat", { filename, @@ -66,12 +68,13 @@ export async function stat(filename: string): Promise<FileInfo> { return new FileInfoImpl(res); } -/** Queries the file system for information on the path provided synchronously. - * `statSync` Will always follow symlinks. +/** Synchronously returns a `Deno.FileInfo` for the specified path. Will + * always follow symlinks. * * const fileInfo = Deno.statSync("hello.txt"); * assert(fileInfo.isFile()); - */ + * + * Requires `allow-read` permission. */ export function statSync(filename: string): FileInfo { const res = sendSync("op_stat", { filename, |