mirror of
https://github.com/denoland/deno.git
synced 2025-09-28 05:04:48 +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
|
@ -1,19 +1,22 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
import { sendSync, sendAsync } from "./dispatch_json.ts";
|
||||
|
||||
/** Changes the permission of a specific file/directory of specified path
|
||||
* synchronously.
|
||||
/** Synchronously changes the permission of a specific file/directory of
|
||||
* specified path. Ignores the process's umask.
|
||||
*
|
||||
* Deno.chmodSync("/path/to/file", 0o666);
|
||||
*/
|
||||
*
|
||||
* Requires `allow-write` permission. */
|
||||
export function chmodSync(path: string, mode: number): void {
|
||||
sendSync("op_chmod", { path, mode });
|
||||
}
|
||||
|
||||
/** Changes the permission of a specific file/directory of specified path.
|
||||
* Ignores the process's umask.
|
||||
*
|
||||
* await Deno.chmod("/path/to/file", 0o666);
|
||||
*/
|
||||
*
|
||||
* Requires `allow-write` permission. */
|
||||
export async function chmod(path: string, mode: number): Promise<void> {
|
||||
await sendAsync("op_chmod", { path, mode });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue