blob: f24ab5e55bc42eff0be51006dcbcf7ca41a79155 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { sendSync, sendAsync } from "../dispatch_json.ts";
import { pathFromURL } from "../../util.ts";
export function chownSync(path: string | URL, uid: number, gid: number): void {
path = pathFromURL(path);
sendSync("op_chown", { path, uid, gid });
}
export async function chown(
path: string | URL,
uid: number,
gid: number
): Promise<void> {
path = pathFromURL(path);
await sendAsync("op_chown", { path, uid, gid });
}
|