summaryrefslogtreecommitdiff
path: root/js/stat.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/stat.ts')
-rw-r--r--js/stat.ts45
1 files changed, 20 insertions, 25 deletions
diff --git a/js/stat.ts b/js/stat.ts
index 4cfc4290f..becab52ee 100644
--- a/js/stat.ts
+++ b/js/stat.ts
@@ -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)));