Skip to main content

chownSync

function Deno.chownSync
allow-write
Jump to headingchownSync(
path: string | URL,
uid: number | null,
gid: number | null,
): void

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.

Parameters Jump to heading

Jump to headingpath: string | URL

path to the file

Jump to headinguid: number | null

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

Jump to headinggid: number | null

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

Return Type Jump to heading

void
Back to top