@@ -3522,8 +3522,6 @@ changes:
3522
3522
it will emit a deprecation warning with id DEP0013.
3523
3523
-->
3524
3524
3525
- > Stability: 1 - Recursive removal is experimental.
3526
-
3527
3525
* ` path ` {string|Buffer|URL}
3528
3526
* ` options ` {Object}
3529
3527
* ` maxRetries ` {integer} If an ` EBUSY ` , ` EMFILE ` , ` ENFILE ` , ` ENOTEMPTY ` , or
@@ -3546,6 +3544,12 @@ to the completion callback.
3546
3544
Using ` fs.rmdir() ` on a file (not a directory) results in an ` ENOENT ` error on
3547
3545
Windows and an ` ENOTDIR ` error on POSIX.
3548
3546
3547
+ Setting ` recursive ` to ` true ` results in behavior similar to the Unix command
3548
+ ` rm -rf ` : an error will not be raised for paths that do not exist, and paths
3549
+ that represent files will be deleted. The permissive behavior of the
3550
+ ` recursive ` option is deprecated, ` ENOTDIR ` and ` ENOENT ` will be thrown in
3551
+ the future.
3552
+
3549
3553
## ` fs.rmdirSync(path[, options]) `
3550
3554
<!-- YAML
3551
3555
added: v0.1.21
@@ -3569,8 +3573,6 @@ changes:
3569
3573
`file:` protocol. Support is currently still *experimental*.
3570
3574
-->
3571
3575
3572
- > Stability: 1 - Recursive removal is experimental.
3573
-
3574
3576
* ` path ` {string|Buffer|URL}
3575
3577
* ` options ` {Object}
3576
3578
* ` maxRetries ` {integer} If an ` EBUSY ` , ` EMFILE ` , ` ENFILE ` , ` ENOTEMPTY ` , or
@@ -3590,6 +3592,12 @@ Synchronous rmdir(2). Returns `undefined`.
3590
3592
Using ` fs.rmdirSync() ` on a file (not a directory) results in an ` ENOENT ` error
3591
3593
on Windows and an ` ENOTDIR ` error on POSIX.
3592
3594
3595
+ Setting ` recursive ` to ` true ` results in behavior similar to the Unix command
3596
+ ` rm -rf ` : an error will not be raised for paths that do not exist, and paths
3597
+ that represent files will be deleted. The permissive behavior of the
3598
+ ` recursive ` option is deprecated, ` ENOTDIR ` and ` ENOENT ` will be thrown in
3599
+ the future.
3600
+
3593
3601
## ` fs.stat(path[, options], callback) `
3594
3602
<!-- YAML
3595
3603
added: v0.0.2
@@ -5475,6 +5483,12 @@ Using `fsPromises.rmdir()` on a file (not a directory) results in the
5475
5483
` Promise ` being rejected with an ` ENOENT ` error on Windows and an ` ENOTDIR `
5476
5484
error on POSIX.
5477
5485
5486
+ Setting ` recursive ` to ` true ` results in behavior similar to the Unix command
5487
+ ` rm -rf ` : an error will not be raised for paths that do not exist, and paths
5488
+ that represent files will be deleted. The permissive behavior of the
5489
+ ` recursive ` option is deprecated, ` ENOTDIR ` and ` ENOENT ` will be thrown in
5490
+ the future.
5491
+
5478
5492
### ` fsPromises.stat(path[, options]) `
5479
5493
<!-- YAML
5480
5494
added: v10.0.0
0 commit comments