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

x/deno/cli/dts/lib.deno.ns.d.ts>Deno.chmodSync

A modern runtime for JavaScript and TypeScript.
Go to Latest
function Deno.chmodSync
allow-write
import { Deno } from "https://deno.land/x/deno@v1.28.1/cli/dts/lib.deno.ns.d.ts";
const { chmodSync } = Deno;

Synchronously changes the permission of a specific file/directory of specified path. Ignores the process's umask.

Deno.chmodSync("/path/to/file", 0o666);

For a full description, see Deno.chmod.

NOTE: This API currently throws on Windows

Requires allow-write permission.

Parameters

path: string | URL
mode: number