Cleanup comments and internal variables (#4205)

This commit is contained in:
dubiousjim 2020-03-02 10:19:42 -05:00 committed by GitHub
parent 809019dc6e
commit 6cd46fa3ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 681 additions and 572 deletions

View file

@ -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 });
}