@@ -3584,15 +3584,15 @@ Synchronous rename(2). Returns `undefined`.
35843584added: v0.0.2
35853585changes:
35863586 - version: REPLACEME
3587- pr-url: https://github.com/nodejs/node/pull/
3588- description: Using `fs.rmdir(path, { recursive: true })` on a `path` that is
3587+ pr-url: https://github.com/nodejs/node/pull/37216
3588+ description: " Using `fs.rmdir(path, { recursive: true })` on a `path` that is
35893589 a file is no longer permitted and results in an `ENOENT` error
3590- on Windows and an `ENOTDIR` error on POSIX.
3590+ on Windows and an `ENOTDIR` error on POSIX."
35913591 - version: REPLACEME
3592- pr-url: https://github.com/nodejs/node/pull/
3593- description: Using `fs.rmdir(path, { recursive: true })` on a `path` that
3592+ pr-url: https://github.com/nodejs/node/pull/37216
3593+ description: " Using `fs.rmdir(path, { recursive: true })` on a `path` that
35943594 does not exist is no longer permitted and results in a `ENOENT`
3595- error.
3595+ error."
35963596 - version:
35973597 - v13.3.0
35983598 - v12.16.0
@@ -3649,15 +3649,15 @@ with options `{ recursive: true, force: true }`.
36493649added: v0.1.21
36503650changes:
36513651 - version: REPLACEME
3652- pr-url: https://github.com/nodejs/node/pull/
3653- description: Using `fs.rmdirSync(path, { recursive: true })` on a `path`
3652+ pr-url: https://github.com/nodejs/node/pull/37216
3653+ description: " Using `fs.rmdirSync(path, { recursive: true })` on a `path`
36543654 that is a file is no longer permitted and results in an
3655- `ENOENT` error on Windows and an `ENOTDIR` error on POSIX.
3655+ `ENOENT` error on Windows and an `ENOTDIR` error on POSIX."
36563656 - version: REPLACEME
3657- pr-url: https://github.com/nodejs/node/pull/
3658- description: Using `fs.rmdirSync(path, { recursive: true })` on a `path`
3657+ pr-url: https://github.com/nodejs/node/pull/37216
3658+ description: " Using `fs.rmdirSync(path, { recursive: true })` on a `path`
36593659 that does not exist is no longer permitted and results in a
3660- `ENOENT` error.
3660+ `ENOENT` error."
36613661 - version:
36623662 - v13.3.0
36633663 - v12.16.0
@@ -5677,6 +5677,16 @@ upon success.
56775677<!-- YAML
56785678added: v10.0.0
56795679changes:
5680+ - version: REPLACEME
5681+ pr-url: https://github.com/nodejs/node/pull/37216
5682+ description: "Using `fsPromises.rmdir(path, { recursive: true })` on a `path`
5683+ that is a file is no longer permitted and results in an
5684+ `ENOENT` error on Windows and an `ENOTDIR` error on POSIX."
5685+ - version: REPLACEME
5686+ pr-url: https://github.com/nodejs/node/pull/37216
5687+ description: "Using `fsPromises.rmdir(path, { recursive: true })` on a `path`
5688+ that does not exist is no longer permitted and results in a
5689+ `ENOENT` error."
56805690 - version:
56815691 - v13.3.0
56825692 - v12.16.0
@@ -5700,8 +5710,7 @@ changes:
57005710 represents the number of retries. This option is ignored if the ` recursive `
57015711 option is not ` true ` . ** Default:** ` 0 ` .
57025712 * ` recursive ` {boolean} If ` true ` , perform a recursive directory removal. In
5703- recursive mode, errors are not reported if ` path ` does not exist, and
5704- operations are retried on failure. ** Default:** ` false ` .
5713+ recursive mode, operations are retried on failure. ** Default:** ` false ` .
57055714 * ` retryDelay ` {integer} The amount of time in milliseconds to wait between
57065715 retries. This option is ignored if the ` recursive ` option is not ` true ` .
57075716 ** Default:** ` 100 ` .
@@ -5714,11 +5723,8 @@ Using `fsPromises.rmdir()` on a file (not a directory) results in the
57145723` Promise ` being rejected with an ` ENOENT ` error on Windows and an ` ENOTDIR `
57155724error on POSIX.
57165725
5717- Setting ` recursive ` to ` true ` results in behavior similar to the Unix command
5718- ` rm -rf ` : an error will not be raised for paths that do not exist, and paths
5719- that represent files will be deleted. The permissive behavior of the
5720- ` recursive ` option is deprecated, ` ENOTDIR ` and ` ENOENT ` will be thrown in
5721- the future.
5726+ To get a behavior similar to the ` rm -rf ` Unix command, use
5727+ [ ` fsPromises.rm() ` ] [ ] with options ` { recursive: true, force: true } ` .
57225728
57235729### ` fsPromises.rm(path[, options]) `
57245730<!-- YAML
@@ -6312,6 +6318,8 @@ the file contents.
63126318[ `fs.readdirSync()` ] : #fs_fs_readdirsync_path_options
63136319[ `fs.readv()` ] : #fs_fs_readv_fd_buffers_position_callback
63146320[ `fs.realpath()` ] : #fs_fs_realpath_path_options_callback
6321+ [ `fs.rm()` ] : #fs_fs_rm_path_options_callback
6322+ [ `fs.rmSync()` ] : #fs_fs_rmsync_path_options
63156323[ `fs.rmdir()` ] : #fs_fs_rmdir_path_options_callback
63166324[ `fs.stat()` ] : #fs_fs_stat_path_options_callback
63176325[ `fs.symlink()` ] : #fs_fs_symlink_target_path_type_callback
@@ -6323,6 +6331,7 @@ the file contents.
63236331[ `fs.writev()` ] : #fs_fs_writev_fd_buffers_position_callback
63246332[ `fsPromises.open()` ] : #fs_fspromises_open_path_flags_mode
63256333[ `fsPromises.opendir()` ] : #fs_fspromises_opendir_path_options
6334+ [ `fsPromises.rm()` ] : #fs_fspromises_rm_path_options
63266335[ `fsPromises.utimes()` ] : #fs_fspromises_utimes_path_atime_mtime
63276336[ `inotify(7)` ] : https://man7.org/linux/man-pages/man7/inotify.7.html
63286337[ `kqueue(2)` ] : https://www.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2
0 commit comments