@@ -3017,10 +3017,14 @@ changes:
3017
3017
3018
3018
Synchronous rename(2). Returns ` undefined ` .
3019
3019
3020
- ## fs.rmdir(path, callback)
3020
+ ## fs.rmdir(path[ , options ] , callback)
3021
3021
<!-- YAML
3022
3022
added: v0.0.2
3023
3023
changes:
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.
3024
3028
- version: v10.0.0
3025
3029
pr-url: https://github.com/nodejs/node/pull/12562
3026
3030
description: The `callback` parameter is no longer optional. Not passing
@@ -3035,7 +3039,21 @@ changes:
3035
3039
it will emit a deprecation warning with id DEP0013.
3036
3040
-->
3037
3041
3042
+ > Stability: 1 - Recursive removal is experimental.
3043
+
3038
3044
* ` 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 ` .
3039
3057
* ` callback ` {Function}
3040
3058
* ` err ` {Error}
3041
3059
@@ -3045,17 +3063,27 @@ to the completion callback.
3045
3063
Using ` fs.rmdir() ` on a file (not a directory) results in an ` ENOENT ` error on
3046
3064
Windows and an ` ENOTDIR ` error on POSIX.
3047
3065
3048
- ## fs.rmdirSync(path)
3066
+ ## fs.rmdirSync(path[ , options ] )
3049
3067
<!-- YAML
3050
3068
added: v0.1.21
3051
3069
changes:
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.
3052
3074
- version: v7.6.0
3053
3075
pr-url: https://github.com/nodejs/node/pull/10739
3054
3076
description: The `path` parameters can be a WHATWG `URL` object using
3055
3077
`file:` protocol. Support is currently still *experimental*.
3056
3078
-->
3057
3079
3080
+ > Stability: 1 - Recursive removal is experimental.
3081
+
3058
3082
* ` 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 ` .
3059
3087
3060
3088
Synchronous rmdir(2). Returns ` undefined ` .
3061
3089
@@ -4694,12 +4722,31 @@ added: v10.0.0
4694
4722
Renames ` oldPath ` to ` newPath ` and resolves the ` Promise ` with no arguments
4695
4723
upon success.
4696
4724
4697
- ### fsPromises.rmdir(path)
4725
+ ### fsPromises.rmdir(path[ , options ] )
4698
4726
<!-- YAML
4699
4727
added: 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.
4700
4733
-->
4701
4734
4735
+ > Stability: 1 - Recursive removal is experimental.
4736
+
4702
4737
* ` 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 ` .
4703
4750
* Returns: {Promise}
4704
4751
4705
4752
Removes the directory identified by ` path ` then resolves the ` Promise ` with
@@ -5193,7 +5240,7 @@ the file contents.
5193
5240
[ `fs.readdir()` ] : #fs_fs_readdir_path_options_callback
5194
5241
[ `fs.readdirSync()` ] : #fs_fs_readdirsync_path_options
5195
5242
[ `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
5197
5244
[ `fs.stat()` ] : #fs_fs_stat_path_options_callback
5198
5245
[ `fs.symlink()` ] : #fs_fs_symlink_target_path_type_callback
5199
5246
[ `fs.utimes()` ] : #fs_fs_utimes_path_atime_mtime_callback
0 commit comments