@@ -3509,9 +3509,9 @@ changes:
35093509* ` options ` {Object}
35103510 * ` maxRetries ` {integer} If an ` EBUSY ` , ` EMFILE ` , ` ENFILE ` , ` ENOTEMPTY ` , or
35113511 ` 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 ` .
35153515 * ` recursive ` {boolean} If ` true ` , perform a recursive directory removal. In
35163516 recursive mode, errors are not reported if ` path ` does not exist, and
35173517 operations are retried on failure. ** Default:** ` false ` .
@@ -3560,9 +3560,9 @@ changes:
35603560* ` options ` {Object}
35613561 * ` maxRetries ` {integer} If an ` EBUSY ` , ` EMFILE ` , ` ENFILE ` , ` ENOTEMPTY ` , or
35623562 ` 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 ` .
35663566 * ` recursive ` {boolean} If ` true ` , perform a recursive directory removal. In
35673567 recursive mode, errors are not reported if ` path ` does not exist, and
35683568 operations are retried on failure. ** Default:** ` false ` .
@@ -3581,6 +3581,53 @@ that represent files will be deleted. The permissive behavior of the
35813581` recursive ` option is deprecated, ` ENOTDIR ` and ` ENOENT ` will be thrown in
35823582the future.
35833583
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+
35843631## ` fs.stat(path[, options], callback) `
35853632<!-- YAML
35863633added: v0.0.2
@@ -5447,9 +5494,9 @@ changes:
54475494* ` options ` {Object}
54485495 * ` maxRetries ` {integer} If an ` EBUSY ` , ` EMFILE ` , ` ENFILE ` , ` ENOTEMPTY ` , or
54495496 ` 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 ` .
54535500 * ` recursive ` {boolean} If ` true ` , perform a recursive directory removal. In
54545501 recursive mode, errors are not reported if ` path ` does not exist, and
54555502 operations are retried on failure. ** Default:** ` false ` .
@@ -5471,6 +5518,28 @@ that represent files will be deleted. The permissive behavior of the
54715518` recursive ` option is deprecated, ` ENOTDIR ` and ` ENOENT ` will be thrown in
54725519the future.
54735520
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+
54745543### ` fsPromises.stat(path[, options]) `
54755544<!-- YAML
54765545added: v10.0.0
0 commit comments