@@ -3509,9 +3509,9 @@ changes:
3509
3509
* ` options ` {Object}
3510
3510
* ` maxRetries ` {integer} If an ` EBUSY ` , ` EMFILE ` , ` ENFILE ` , ` ENOTEMPTY ` , or
3511
3511
` EPERM ` error is encountered, Node.js will retry the operation with a linear
3512
- backoff wait of ` retryDelay ` ms longer on each try. This option represents
3513
- the number of retries. This option is ignored if the ` recursive ` option is
3514
- not ` true ` . ** Default:** ` 0 ` .
3512
+ backoff wait of ` retryDelay ` milliseconds longer on each try. This option
3513
+ represents the number of retries. This option is ignored if the ` recursive `
3514
+ option is not ` true ` . ** Default:** ` 0 ` .
3515
3515
* ` recursive ` {boolean} If ` true ` , perform a recursive directory removal. In
3516
3516
recursive mode, errors are not reported if ` path ` does not exist, and
3517
3517
operations are retried on failure. ** Default:** ` false ` .
@@ -3560,9 +3560,9 @@ changes:
3560
3560
* ` options ` {Object}
3561
3561
* ` maxRetries ` {integer} If an ` EBUSY ` , ` EMFILE ` , ` ENFILE ` , ` ENOTEMPTY ` , or
3562
3562
` EPERM ` error is encountered, Node.js will retry the operation with a linear
3563
- backoff wait of ` retryDelay ` ms longer on each try. This option represents
3564
- the number of retries. This option is ignored if the ` recursive ` option is
3565
- not ` true ` . ** Default:** ` 0 ` .
3563
+ backoff wait of ` retryDelay ` milliseconds longer on each try. This option
3564
+ represents the number of retries. This option is ignored if the ` recursive `
3565
+ option is not ` true ` . ** Default:** ` 0 ` .
3566
3566
* ` recursive ` {boolean} If ` true ` , perform a recursive directory removal. In
3567
3567
recursive mode, errors are not reported if ` path ` does not exist, and
3568
3568
operations are retried on failure. ** Default:** ` false ` .
@@ -3581,6 +3581,53 @@ that represent files will be deleted. The permissive behavior of the
3581
3581
` recursive ` option is deprecated, ` ENOTDIR ` and ` ENOENT ` will be thrown in
3582
3582
the future.
3583
3583
3584
+ ## ` fs.rm(path[, options], callback) `
3585
+ <!-- YAML
3586
+ added: REPLACEME
3587
+ -->
3588
+
3589
+ * ` path ` {string|Buffer|URL}
3590
+ * ` options ` {Object}
3591
+ * ` force ` don't error on nonexistent path
3592
+ * ` maxRetries ` {integer} If an ` EBUSY ` , ` EMFILE ` , ` ENFILE ` , ` ENOTEMPTY ` , or
3593
+ ` EPERM ` error is encountered, Node.js will retry the operation with a linear
3594
+ backoff wait of ` retryDelay ` milliseconds longer on each try. This option
3595
+ represents the number of retries. This option is ignored if the ` recursive `
3596
+ option is not ` true ` . ** Default:** ` 0 ` .
3597
+ * ` recursive ` {boolean} If ` true ` , perform a recursive removal. In
3598
+ recursive mode operations are retried on failure. ** Default:** ` false ` .
3599
+ * ` retryDelay ` {integer} The amount of time in milliseconds to wait between
3600
+ retries. This option is ignored if the ` recursive ` option is not ` true ` .
3601
+ ** Default:** ` 100 ` .
3602
+ * ` callback ` {Function}
3603
+ * ` err ` {Error}
3604
+
3605
+ Asynchronously removes files and directories (modeled on the standard POSIX ` rm `
3606
+ utility). No arguments other than a possible exception are given to the
3607
+ completion callback.
3608
+
3609
+ ## ` fs.rmSync(path[, options]) `
3610
+ <!-- YAML
3611
+ added: REPLACEME
3612
+ -->
3613
+
3614
+ * ` path ` {string|Buffer|URL}
3615
+ * ` options ` {Object}
3616
+ * ` force ` Ignore errors
3617
+ * ` maxRetries ` {integer} If an ` EBUSY ` , ` EMFILE ` , ` ENFILE ` , ` ENOTEMPTY ` , or
3618
+ ` EPERM ` error is encountered, Node.js will retry the operation with a linear
3619
+ backoff wait of ` retryDelay ` milliseconds longer on each try. This option
3620
+ represents the number of retries. This option is ignored if the ` recursive `
3621
+ option is not ` true ` . ** Default:** ` 0 ` .
3622
+ * ` recursive ` {boolean} If ` true ` , perform a recursive directory removal. In
3623
+ recursive mode operations are retried on failure. ** Default:** ` false ` .
3624
+ * ` retryDelay ` {integer} The amount of time in milliseconds to wait between
3625
+ retries. This option is ignored if the ` recursive ` option is not ` true ` .
3626
+ ** Default:** ` 100 ` .
3627
+
3628
+ Synchronously removes files and directories (modeled on the standard POSIX ` rm `
3629
+ utility). Returns ` undefined ` .
3630
+
3584
3631
## ` fs.stat(path[, options], callback) `
3585
3632
<!-- YAML
3586
3633
added: v0.0.2
@@ -5447,9 +5494,9 @@ changes:
5447
5494
* ` options ` {Object}
5448
5495
* ` maxRetries ` {integer} If an ` EBUSY ` , ` EMFILE ` , ` ENFILE ` , ` ENOTEMPTY ` , or
5449
5496
` EPERM ` error is encountered, Node.js will retry the operation with a linear
5450
- backoff wait of ` retryDelay ` ms longer on each try. This option represents
5451
- the number of retries. This option is ignored if the ` recursive ` option is
5452
- not ` true ` . ** Default:** ` 0 ` .
5497
+ backoff wait of ` retryDelay ` milliseconds longer on each try. This option
5498
+ represents the number of retries. This option is ignored if the ` recursive `
5499
+ option is not ` true ` . ** Default:** ` 0 ` .
5453
5500
* ` recursive ` {boolean} If ` true ` , perform a recursive directory removal. In
5454
5501
recursive mode, errors are not reported if ` path ` does not exist, and
5455
5502
operations are retried on failure. ** Default:** ` false ` .
@@ -5471,6 +5518,28 @@ that represent files will be deleted. The permissive behavior of the
5471
5518
` recursive ` option is deprecated, ` ENOTDIR ` and ` ENOENT ` will be thrown in
5472
5519
the future.
5473
5520
5521
+ ## ` fsPromises.rm(path[, options]) `
5522
+ <!-- YAML
5523
+ added: REPLACEME
5524
+ -->
5525
+
5526
+ * ` path ` {string|Buffer|URL}
5527
+ * ` options ` {Object}
5528
+ * ` force ` Ignore errors
5529
+ * ` maxRetries ` {integer} If an ` EBUSY ` , ` EMFILE ` , ` ENFILE ` , ` ENOTEMPTY ` , or
5530
+ ` EPERM ` error is encountered, Node.js will retry the operation with a linear
5531
+ backoff wait of ` retryDelay ` milliseconds longer on each try. This option
5532
+ represents the number of retries. This option is ignored if the ` recursive `
5533
+ option is not ` true ` . ** Default:** ` 0 ` .
5534
+ * ` recursive ` {boolean} If ` true ` , perform a recursive directory removal. In
5535
+ recursive mode operations are retried on failure. ** Default:** ` false ` .
5536
+ * ` retryDelay ` {integer} The amount of time in milliseconds to wait between
5537
+ retries. This option is ignored if the ` recursive ` option is not ` true ` .
5538
+ ** Default:** ` 100 ` .
5539
+
5540
+ Synchronously removes files and directories (modeled on the standard POSIX ` rm `
5541
+ utility). Resolves the ` Promise ` with no arguments on success.
5542
+
5474
5543
### ` fsPromises.stat(path[, options]) `
5475
5544
<!-- YAML
5476
5545
added: v10.0.0
0 commit comments