summaryrefslogtreecommitdiff
path: root/cli/js/ops/fs/chmod.ts
blob: 91e898360c20a78efce25e0a553475f903fc0f49 (plain)
1
2
3
4
5
6
7
8
9
10
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { sendSync, sendAsync } from "../dispatch_json.ts";

export function chmodSync(path: string, mode: number): void {
  sendSync("op_chmod", { path, mode });
}

export async function chmod(path: string, mode: number): Promise<void> {
  await sendAsync("op_chmod", { path, mode });
}