@@ -3017,10 +3017,14 @@ changes:
30173017
30183018Synchronous rename(2). Returns ` undefined ` .
30193019
3020- ## fs.rmdir(path, callback)
3020+ ## fs.rmdir(path[ , options ] , callback)
30213021<!-- YAML
30223022added: v0.0.2
30233023changes:
3024+ - version: REPLACEME
3025+ pr-url: https://github.com/nodejs/node/pull/29168
3026+ description: The `recursive`, `maxBusyTries`, and `emfileWait` options are
3027+ now supported.
30243028 - version: v10.0.0
30253029 pr-url: https://github.com/nodejs/node/pull/12562
30263030 description: The `callback` parameter is no longer optional. Not passing
@@ -3035,7 +3039,21 @@ changes:
30353039 it will emit a deprecation warning with id DEP0013.
30363040-->
30373041
3042+ > Stability: 1 - Recursive removal is experimental.
3043+
30383044* ` path ` {string|Buffer|URL}
3045+ * ` options ` {Object}
3046+ * ` emfileWait ` {integer} If an ` EMFILE ` error is encountered, Node.js will
3047+ retry the operation with a linear backoff of 1ms longer on each try until the
3048+ timeout duration passes this limit. This option is ignored if the ` recursive `
3049+ option is not ` true ` . ** Default:** ` 1000 ` .
3050+ * ` maxBusyTries ` {integer} If an ` EBUSY ` , ` ENOTEMPTY ` , or ` EPERM ` error is
3051+ encountered, Node.js will retry the operation with a linear backoff wait of
3052+ 100ms longer on each try. This option represents the number of retries. This
3053+ option is ignored if the ` recursive ` option is not ` true ` . ** Default:** ` 3 ` .
3054+ * ` recursive ` {boolean} If ` true ` , perform a recursive directory removal. In
3055+ recursive mode, errors are not reported if ` path ` does not exist, and
3056+ operations are retried on failure. ** Default:** ` false ` .
30393057* ` callback ` {Function}
30403058 * ` err ` {Error}
30413059
@@ -3045,17 +3063,27 @@ to the completion callback.
30453063Using ` fs.rmdir() ` on a file (not a directory) results in an ` ENOENT ` error on
30463064Windows and an ` ENOTDIR ` error on POSIX.
30473065
3048- ## fs.rmdirSync(path)
3066+ ## fs.rmdirSync(path[ , options ] )
30493067<!-- YAML
30503068added: v0.1.21
30513069changes:
3070+ - version: REPLACEME
3071+ pr-url: https://github.com/nodejs/node/pull/29168
3072+ description: The `recursive`, `maxBusyTries`, and `emfileWait` options are
3073+ now supported.
30523074 - version: v7.6.0
30533075 pr-url: https://github.com/nodejs/node/pull/10739
30543076 description: The `path` parameters can be a WHATWG `URL` object using
30553077 `file:` protocol. Support is currently still *experimental*.
30563078-->
30573079
3080+ > Stability: 1 - Recursive removal is experimental.
3081+
30583082* ` path ` {string|Buffer|URL}
3083+ * ` options ` {Object}
3084+ * ` recursive ` {boolean} If ` true ` , perform a recursive directory removal. In
3085+ recursive mode, errors are not reported if ` path ` does not exist, and
3086+ operations are retried on failure. ** Default:** ` false ` .
30593087
30603088Synchronous rmdir(2). Returns ` undefined ` .
30613089
@@ -4694,12 +4722,31 @@ added: v10.0.0
46944722Renames ` oldPath ` to ` newPath ` and resolves the ` Promise ` with no arguments
46954723upon success.
46964724
4697- ### fsPromises.rmdir(path)
4725+ ### fsPromises.rmdir(path[ , options ] )
46984726<!-- YAML
46994727added: v10.0.0
4728+ changes:
4729+ - version: REPLACEME
4730+ pr-url: https://github.com/nodejs/node/pull/29168
4731+ description: The `recursive`, `maxBusyTries`, and `emfileWait` options are
4732+ now supported.
47004733-->
47014734
4735+ > Stability: 1 - Recursive removal is experimental.
4736+
47024737* ` path ` {string|Buffer|URL}
4738+ * ` options ` {Object}
4739+ * ` emfileWait ` {integer} If an ` EMFILE ` error is encountered, Node.js will
4740+ retry the operation with a linear backoff of 1ms longer on each try until the
4741+ timeout duration passes this limit. This option is ignored if the ` recursive `
4742+ option is not ` true ` . ** Default:** ` 1000 ` .
4743+ * ` maxBusyTries ` {integer} If an ` EBUSY ` , ` ENOTEMPTY ` , or ` EPERM ` error is
4744+ encountered, Node.js will retry the operation with a linear backoff wait of
4745+ 100ms longer on each try. This option represents the number of retries. This
4746+ option is ignored if the ` recursive ` option is not ` true ` . ** Default:** ` 3 ` .
4747+ * ` recursive ` {boolean} If ` true ` , perform a recursive directory removal. In
4748+ recursive mode, errors are not reported if ` path ` does not exist, and
4749+ operations are retried on failure. ** Default:** ` false ` .
47034750* Returns: {Promise}
47044751
47054752Removes the directory identified by ` path ` then resolves the ` Promise ` with
@@ -5193,7 +5240,7 @@ the file contents.
51935240[ `fs.readdir()` ] : #fs_fs_readdir_path_options_callback
51945241[ `fs.readdirSync()` ] : #fs_fs_readdirsync_path_options
51955242[ `fs.realpath()` ] : #fs_fs_realpath_path_options_callback
5196- [ `fs.rmdir()` ] : #fs_fs_rmdir_path_callback
5243+ [ `fs.rmdir()` ] : #fs_fs_rmdir_path_options_callback
51975244[ `fs.stat()` ] : #fs_fs_stat_path_options_callback
51985245[ `fs.symlink()` ] : #fs_fs_symlink_target_path_type_callback
51995246[ `fs.utimes()` ] : #fs_fs_utimes_path_atime_mtime_callback
0 commit comments