Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/levo/lib/lib.deno_runtime.d.ts>Deno.chownSync

Server side rendering with The Elm Architecture in Deno
Latest
function Deno.chownSync
import { Deno } from "https://deno.land/x/levo@v0.0.27/lib/lib.deno_runtime.d.ts";
const { chownSync } = Deno;

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

path: string | URL

path to the file

uid: number | null

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

gid: number | null

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