Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/cli/js/lib.deno.ns.d.ts>Deno.chownSync

A modern runtime for JavaScript and TypeScript.
Go to Latest
function Deno.chownSync
import { Deno } from "https://deno.land/x/deno@v1.0.0/cli/js/lib.deno.ns.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

path to the file

uid: number

user id (UID) of the new owner

gid: number

group id (GID) of the new owner