Skip to main content
Module

x/netzo/deno.d.ts>Deno.chown

SDK for Netzo, the open Web platform to unify IoT devices, applications and services.
Go to Latest
function Deno.chown
allow-write
import { Deno } from "https://deno.land/x/netzo@v0.1.10/deno.d.ts";
const { chown } = Deno;

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

await Deno.chown("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

Returns

Promise<void>