diff options
author | dubiousjim <dubiousjim@gmail.com> | 2020-07-06 07:15:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-06 13:15:13 +0200 |
commit | 6b78729ba8c21f6b3ba5a4621fc363d8772e177f (patch) | |
tree | 7ac29fd456c6a0e643bdd804d026d96ac8678199 /cli/js/ops/fs | |
parent | 79610378d3001757b7664a0cefa8fc99125f5a18 (diff) |
feat: Deno.chown() make uid, gid args optional (#4612)
Diffstat (limited to 'cli/js/ops/fs')
-rw-r--r-- | cli/js/ops/fs/chown.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cli/js/ops/fs/chown.ts b/cli/js/ops/fs/chown.ts index f24ab5e55..3afe07f16 100644 --- a/cli/js/ops/fs/chown.ts +++ b/cli/js/ops/fs/chown.ts @@ -2,15 +2,19 @@ import { sendSync, sendAsync } from "../dispatch_json.ts"; import { pathFromURL } from "../../util.ts"; -export function chownSync(path: string | URL, uid: number, gid: number): void { +export function chownSync( + path: string | URL, + uid: number | null, + gid: number | null +): void { path = pathFromURL(path); sendSync("op_chown", { path, uid, gid }); } export async function chown( path: string | URL, - uid: number, - gid: number + uid: number | null, + gid: number | null ): Promise<void> { path = pathFromURL(path); await sendAsync("op_chown", { path, uid, gid }); |