mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 12:49:10 +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
|
@ -2,27 +2,29 @@
|
|||
import { sendSync, sendAsync } from "./dispatch_json.ts";
|
||||
|
||||
export interface RemoveOption {
|
||||
/** Defaults to `false`. If set to `true`, path will be removed even if
|
||||
* it's a non-empty directory. */
|
||||
recursive?: boolean;
|
||||
}
|
||||
|
||||
/** Removes the named file, directory or symlink synchronously. Would throw
|
||||
* error if permission denied, not found, or directory not empty if `recursive`
|
||||
* set to false.
|
||||
* `recursive` is set to false by default.
|
||||
/** Synchronously removes the named file or directory. Throws error if
|
||||
* permission denied, path not found, or path is a non-empty directory and
|
||||
* the `recursive` option isn't set to `true`.
|
||||
*
|
||||
* Deno.removeSync("/path/to/dir/or/file", {recursive: false});
|
||||
*/
|
||||
* Deno.removeSync("/path/to/dir/or/file", { recursive: false });
|
||||
*
|
||||
* Requires `allow-write` permission. */
|
||||
export function removeSync(path: string, options: RemoveOption = {}): void {
|
||||
sendSync("op_remove", { path, recursive: !!options.recursive });
|
||||
}
|
||||
|
||||
/** Removes the named file, directory or symlink. Would throw error if
|
||||
* permission denied, not found, or directory not empty if `recursive` set
|
||||
* to false.
|
||||
* `recursive` is set to false by default.
|
||||
/** Removes the named file or directory. Throws error if permission denied,
|
||||
* path not found, or path is a non-empty directory and the `recursive`
|
||||
* option isn't set to `true`.
|
||||
*
|
||||
* await Deno.remove("/path/to/dir/or/file", {recursive: false});
|
||||
*/
|
||||
* await Deno.remove("/path/to/dir/or/file", { recursive: false });
|
||||
*
|
||||
* Requires `allow-write` permission. */
|
||||
export async function remove(
|
||||
path: string,
|
||||
options: RemoveOption = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue