diff options
Diffstat (limited to 'js/remove.ts')
-rw-r--r-- | js/remove.ts | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/js/remove.ts b/js/remove.ts index b5619cd49..1195f3a30 100644 --- a/js/remove.ts +++ b/js/remove.ts @@ -3,47 +3,41 @@ import * as msg from "gen/msg_generated"; import { flatbuffers } from "flatbuffers"; import * as dispatch from "./dispatch"; -/** - * Removes the named file or (empty) directory synchronously. - * Would throw error if permission denied, not found, or - * directory not empty. +/** Removes the named file or (empty) directory synchronously. Would throw + * error if permission denied, not found, or directory not empty. * - * import { removeSync } from "deno"; - * removeSync("/path/to/empty_dir/or/file"); + * import { removeSync } from "deno"; + * removeSync("/path/to/empty_dir/or/file"); */ export function removeSync(path: string): void { dispatch.sendSync(...req(path, false)); } -/** - * Removes the named file or (empty) directory. - * Would throw error if permission denied, not found, or - * directory not empty. +/** Removes the named file or (empty) directory. Would throw error if + * permission denied, not found, or directory not empty. * - * import { remove } from "deno"; - * await remove("/path/to/empty_dir/or/file"); + * import { remove } from "deno"; + * await remove("/path/to/empty_dir/or/file"); */ export async function remove(path: string): Promise<void> { await dispatch.sendAsync(...req(path, false)); } -/** - * Recursively removes the named file or directory synchronously. - * Would throw error if permission denied or not found +/** Recursively removes the named file or directory synchronously. Would throw + * error if permission denied or not found. * - * import { removeAllSync } from "deno"; - * removeAllSync("/path/to/dir/or/file"); + * import { removeAllSync } from "deno"; + * removeAllSync("/path/to/dir/or/file"); */ export function removeAllSync(path: string): void { dispatch.sendSync(...req(path, true)); } -/** - * Recursively removes the named file or directory. - * Would throw error if permission denied or not found +/** Recursively removes the named file or directory. Would throw error if + * permission denied or not found. * - * import { removeAll } from "deno"; - * await removeAll("/path/to/dir/or/file"); + * import { removeAll } from "deno"; + * await removeAll("/path/to/dir/or/file"); */ export async function removeAll(path: string): Promise<void> { await dispatch.sendAsync(...req(path, true)); |