Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/security / / ensureDirMode

Function: ensureDirMode()

ts
function ensureDirMode(
   path, 
   mode, 
opts?): Promise<void>;

Defined in: packages/security/src/hardening/file-modes.ts:77

Ensure a directory exists at the supplied POSIX mode. Creates the directory recursively when it does not exist.

Parameters

ParameterType
pathstring
modenumber
opts?{ warn?: (message) => void; }
opts.warn?(message) => void

Returns

Promise&lt;void&gt;

Stable