diff --git a/doc/api/fs.md b/doc/api/fs.md index 1f71a537e3eb46..0807c5b398f293 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2086,6 +2086,14 @@ fs.mkdir('/tmp/a/apple', { recursive: true }, (err) => { }); ``` +The [`util.features`][] symbol can be used to feature detect if +recursion is available. + +```js +fs.mkdir[util.features].recursive; +// true +``` + See also: mkdir(2). ## fs.mkdirSync(path[, options]) @@ -2106,6 +2114,14 @@ changes: Synchronously creates a directory. Returns `undefined`. This is the synchronous version of [`fs.mkdir()`][]. +The [`util.features`][] symbol can be used to feature detect if +recursion is available. + +```js +fs.mkdirSync[util.features].recursive; +// true +``` + See also: mkdir(2). ## fs.mkdtemp(prefix[, options], callback) @@ -4012,6 +4028,14 @@ The optional `options` argument can be an integer specifying mode (permission and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent folders should be created. +The [`util.features`][] symbol can be used to feature detect if +recursion is available. + +```js +fs.mkdir[util.features].recursive; +// true +``` + ### fsPromises.mkdtemp(prefix[, options]) + +* {symbol} that can be used to do feature detection. + ## util.format(format[, ...args])