Go to Latest
function parseFileMode
import { parseFileMode } from "https://dotland.deno.dev/std@0.177.0/node/internal/validators.mjs";

Parse and validate values that will be converted into mode_t (the S_* constants). Only valid numbers and octal strings are allowed. They could be converted to 32-bit unsigned integers or non-negative signed integers in the C++ land, but any value higher than 0o777 will result in platform-specific behaviors.

Parameters

value

Values to be validated

name

Name of the argument

def

If specified, will be returned for invalid values