mirror of
https://github.com/denoland/deno.git
synced 2025-09-28 13:14:48 +00:00
Cleanup comments and internal variables (#4205)
This commit is contained in:
parent
809019dc6e
commit
6cd46fa3ef
25 changed files with 681 additions and 572 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue