From 6cd46fa3ef4b12f35a60f1a33c7f038c06b5fc71 Mon Sep 17 00:00:00 2001 From: dubiousjim Date: Mon, 2 Mar 2020 10:19:42 -0500 Subject: Cleanup comments and internal variables (#4205) --- cli/js/stat.ts | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'cli/js/stat.ts') 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 { const res = (await sendAsync("op_stat", { filename, @@ -37,13 +38,13 @@ export async function lstat(filename: string): Promise { 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 { const res = (await sendAsync("op_stat", { filename, @@ -66,12 +68,13 @@ export async function stat(filename: string): Promise { 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, -- cgit v1.2.3