-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c4962b0
commit 6c9b4ef
Showing
36 changed files
with
342 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. | ||
import { sendSync, sendAsync } from "./dispatch_json.ts"; | ||
import * as dispatch from "./dispatch.ts"; | ||
import { JsonOp } from "./dispatch_json.ts"; | ||
|
||
const OP_CHMOD = new JsonOp("chmod"); | ||
|
||
/** Changes the permission of a specific file/directory of specified path | ||
* synchronously. | ||
* | ||
* Deno.chmodSync("/path/to/file", 0o666); | ||
*/ | ||
export function chmodSync(path: string, mode: number): void { | ||
sendSync(dispatch.OP_CHMOD, { path, mode }); | ||
OP_CHMOD.sendSync({ path, mode }); | ||
} | ||
|
||
/** Changes the permission of a specific file/directory of specified path. | ||
* | ||
* await Deno.chmod("/path/to/file", 0o666); | ||
*/ | ||
export async function chmod(path: string, mode: number): Promise<void> { | ||
await sendAsync(dispatch.OP_CHMOD, { path, mode }); | ||
await OP_CHMOD.sendAsync({ path, mode }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.