mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
Align JSDoc to style guide.
This commit is contained in:
parent
1840a19713
commit
10a97679ac
31 changed files with 437 additions and 423 deletions
38
js/remove.ts
38
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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue