@@ -3533,9 +3533,9 @@ changes:
3533
3533
* ` options ` {Object}
3534
3534
* ` maxRetries ` {integer} If an ` EBUSY ` , ` EMFILE ` , ` ENFILE ` , ` ENOTEMPTY ` , or
3535
3535
` EPERM ` error is encountered, Node.js will retry the operation with a linear
3536
- backoff wait of ` retryDelay ` ms longer on each try. This option represents
3537
- the number of retries. This option is ignored if the ` recursive ` option is
3538
- not ` true ` . ** Default:** ` 0 ` .
3536
+ backoff wait of ` retryDelay ` milliseconds longer on each try. This option
3537
+ represents the number of retries. This option is ignored if the ` recursive `
3538
+ option is not ` true ` . ** Default:** ` 0 ` .
3539
3539
* ` recursive ` {boolean} If ` true ` , perform a recursive directory removal. In
3540
3540
recursive mode, errors are not reported if ` path ` does not exist, and
3541
3541
operations are retried on failure. ** Default:** ` false ` .
@@ -3584,9 +3584,9 @@ changes:
3584
3584
* ` options ` {Object}
3585
3585
* ` maxRetries ` {integer} If an ` EBUSY ` , ` EMFILE ` , ` ENFILE ` , ` ENOTEMPTY ` , or
3586
3586
` EPERM ` error is encountered, Node.js will retry the operation with a linear
3587
- backoff wait of ` retryDelay ` ms longer on each try. This option represents
3588
- the number of retries. This option is ignored if the ` recursive ` option is
3589
- not ` true ` . ** Default:** ` 0 ` .
3587
+ backoff wait of ` retryDelay ` milliseconds longer on each try. This option
3588
+ represents the number of retries. This option is ignored if the ` recursive `
3589
+ option is not ` true ` . ** Default:** ` 0 ` .
3590
3590
* ` recursive ` {boolean} If ` true ` , perform a recursive directory removal. In
3591
3591
recursive mode, errors are not reported if ` path ` does not exist, and
3592
3592
operations are retried on failure. ** Default:** ` false ` .
@@ -3605,6 +3605,53 @@ that represent files will be deleted. The permissive behavior of the
3605
3605
` recursive ` option is deprecated, ` ENOTDIR ` and ` ENOENT ` will be thrown in
3606
3606
the future.
3607
3607
3608
+ ## ` fs.rm(path[, options], callback) `
3609
+ <!-- YAML
3610
+ added: REPLACEME
3611
+ -->
3612
+
3613
+ * ` path ` {string|Buffer|URL}
3614
+ * ` options ` {Object}
3615
+ * ` force ` don't error on nonexistent path
3616
+ * ` maxRetries ` {integer} If an ` EBUSY ` , ` EMFILE ` , ` ENFILE ` , ` ENOTEMPTY ` , or
3617
+ ` EPERM ` error is encountered, Node.js will retry the operation with a linear
3618
+ backoff wait of ` retryDelay ` milliseconds longer on each try. This option
3619
+ represents the number of retries. This option is ignored if the ` recursive `
3620
+ option is not ` true ` . ** Default:** ` 0 ` .
3621
+ * ` recursive ` {boolean} If ` true ` , perform a recursive removal. In
3622
+ recursive mode operations are retried on failure. ** Default:** ` false ` .
3623
+ * ` retryDelay ` {integer} The amount of time in milliseconds to wait between
3624
+ retries. This option is ignored if the ` recursive ` option is not ` true ` .
3625
+ ** Default:** ` 100 ` .
3626
+ * ` callback ` {Function}
3627
+ * ` err ` {Error}
3628
+
3629
+ Asynchronously removes files and directories (modeled on the standard POSIX ` rm `
3630
+ utility). No arguments other than a possible exception are given to the
3631
+ completion callback.
3632
+
3633
+ ## ` fs.rmSync(path[, options]) `
3634
+ <!-- YAML
3635
+ added: REPLACEME
3636
+ -->
3637
+
3638
+ * ` path ` {string|Buffer|URL}
3639
+ * ` options ` {Object}
3640
+ * ` force ` Ignore errors
3641
+ * ` maxRetries ` {integer} If an ` EBUSY ` , ` EMFILE ` , ` ENFILE ` , ` ENOTEMPTY ` , or
3642
+ ` EPERM ` error is encountered, Node.js will retry the operation with a linear
3643
+ backoff wait of ` retryDelay ` milliseconds longer on each try. This option
3644
+ represents the number of retries. This option is ignored if the ` recursive `
3645
+ option is not ` true ` . ** Default:** ` 0 ` .
3646
+ * ` recursive ` {boolean} If ` true ` , perform a recursive directory removal. In
3647
+ recursive mode operations are retried on failure. ** Default:** ` false ` .
3648
+ * ` retryDelay ` {integer} The amount of time in milliseconds to wait between
3649
+ retries. This option is ignored if the ` recursive ` option is not ` true ` .
3650
+ ** Default:** ` 100 ` .
3651
+
3652
+ Synchronously removes files and directories (modeled on the standard POSIX ` rm `
3653
+ utility). Returns ` undefined ` .
3654
+
3608
3655
## ` fs.stat(path[, options], callback) `
3609
3656
<!-- YAML
3610
3657
added: v0.0.2
@@ -5477,9 +5524,9 @@ changes:
5477
5524
* ` options ` {Object}
5478
5525
* ` maxRetries ` {integer} If an ` EBUSY ` , ` EMFILE ` , ` ENFILE ` , ` ENOTEMPTY ` , or
5479
5526
` EPERM ` error is encountered, Node.js will retry the operation with a linear
5480
- backoff wait of ` retryDelay ` ms longer on each try. This option represents
5481
- the number of retries. This option is ignored if the ` recursive ` option is
5482
- not ` true ` . ** Default:** ` 0 ` .
5527
+ backoff wait of ` retryDelay ` milliseconds longer on each try. This option
5528
+ represents the number of retries. This option is ignored if the ` recursive `
5529
+ option is not ` true ` . ** Default:** ` 0 ` .
5483
5530
* ` recursive ` {boolean} If ` true ` , perform a recursive directory removal. In
5484
5531
recursive mode, errors are not reported if ` path ` does not exist, and
5485
5532
operations are retried on failure. ** Default:** ` false ` .
@@ -5501,6 +5548,28 @@ that represent files will be deleted. The permissive behavior of the
5501
5548
` recursive ` option is deprecated, ` ENOTDIR ` and ` ENOENT ` will be thrown in
5502
5549
the future.
5503
5550
5551
+ ## ` fsPromises.rm(path[, options]) `
5552
+ <!-- YAML
5553
+ added: REPLACEME
5554
+ -->
5555
+
5556
+ * ` path ` {string|Buffer|URL}
5557
+ * ` options ` {Object}
5558
+ * ` force ` Ignore errors
5559
+ * ` maxRetries ` {integer} If an ` EBUSY ` , ` EMFILE ` , ` ENFILE ` , ` ENOTEMPTY ` , or
5560
+ ` EPERM ` error is encountered, Node.js will retry the operation with a linear
5561
+ backoff wait of ` retryDelay ` milliseconds longer on each try. This option
5562
+ represents the number of retries. This option is ignored if the ` recursive `
5563
+ option is not ` true ` . ** Default:** ` 0 ` .
5564
+ * ` recursive ` {boolean} If ` true ` , perform a recursive directory removal. In
5565
+ recursive mode operations are retried on failure. ** Default:** ` false ` .
5566
+ * ` retryDelay ` {integer} The amount of time in milliseconds to wait between
5567
+ retries. This option is ignored if the ` recursive ` option is not ` true ` .
5568
+ ** Default:** ` 100 ` .
5569
+
5570
+ Synchronously removes files and directories (modeled on the standard POSIX ` rm `
5571
+ utility). Resolves the ` Promise ` with no arguments on success.
5572
+
5504
5573
### ` fsPromises.stat(path[, options]) `
5505
5574
<!-- YAML
5506
5575
added: v10.0.0
0 commit comments