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.unstable.d.ts>Deno.umask

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

UNSTABLE: New API, yet to be vetted.

Retrieve the process umask. If mask is provided, sets the process umask. This call always returns what the umask was before the call.

console.log(Deno.umask());  // e.g. 18 (0o022)
const prevUmaskValue = Deno.umask(0o077);  // e.g. 18 (0o022)
console.log(Deno.umask());  // e.g. 63 (0o077)

This API is under consideration to determine if permissions are required to call it.

Note: This API is not implemented on Windows

Parameters

optional
mask: number

Returns

number