Align JSDoc to style guide.

This commit is contained in:
Kitson Kelly 2018-10-15 07:29:50 +11:00 committed by Ryan Dahl
parent 1840a19713
commit 10a97679ac
31 changed files with 437 additions and 423 deletions

View file

@ -5,51 +5,46 @@ import * as dispatch from "./dispatch";
import { assert } from "./util";
import { FileInfo, FileInfoImpl } from "./file_info";
/**
* Queries the file system for information on the path provided.
* If the given path is a symlink information about the symlink will
* be returned.
/** Queries the file system for information on the path provided. If the given
* path is a symlink information about the symlink will be returned.
*
* import { lstat } from "deno";
* const fileInfo = await lstat("hello.txt");
* assert(fileInfo.isFile());
* import { lstat } from "deno";
* const fileInfo = await lstat("hello.txt");
* assert(fileInfo.isFile());
*/
export async function lstat(filename: string): Promise<FileInfo> {
return res(await dispatch.sendAsync(...req(filename, true)));
}
/**
* 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.
/** 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.
*
* import { lstatSync } from "deno";
* const fileInfo = lstatSync("hello.txt");
* assert(fileInfo.isFile());
* import { lstatSync } from "deno";
* const fileInfo = lstatSync("hello.txt");
* assert(fileInfo.isFile());
*/
export function lstatSync(filename: string): FileInfo {
return res(dispatch.sendSync(...req(filename, true)));
}
/**
* Queries the file system for information on the path provided.
* `stat` Will always follow symlinks.
/** Queries the file system for information on the path provided. `stat` Will
* always follow symlinks.
*
* import { stat } from "deno";
* const fileInfo = await stat("hello.txt");
* assert(fileInfo.isFile());
* import { stat } from "deno";
* const fileInfo = await stat("hello.txt");
* assert(fileInfo.isFile());
*/
export async function stat(filename: string): Promise<FileInfo> {
return res(await dispatch.sendAsync(...req(filename, false)));
}
/**
* Queries the file system for information on the path provided synchronously.
/** Queries the file system for information on the path provided synchronously.
* `statSync` Will always follow symlinks.
*
* import { statSync } from "deno";
* const fileInfo = statSync("hello.txt");
* assert(fileInfo.isFile());
* import { statSync } from "deno";
* const fileInfo = statSync("hello.txt");
* assert(fileInfo.isFile());
*/
export function statSync(filename: string): FileInfo {
return res(dispatch.sendSync(...req(filename, false)));