Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Deno.chownSync

Synchronously change owner of a regular file or directory. This functionality is not available on Windows.

Deno.chownSync("myFile.txt", 1000, 1002);

Requires allow-write permission.

Throws Error (not implemented) if executed on Windows

function chownSync(
path: string | URL,
uid: number | null,
gid: number | null,
): void;
§
chownSync(path: string | URL, uid: number | null, gid: number | null): void
[src]

§Parameters

§
path: string | URL
[src]

path to the file

§
uid: number | null
[src]

user id (UID) of the new owner, or null for no change

§
gid: number | null
[src]

group id (GID) of the new owner, or null for no change

§Return Type