Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fcbdb06

Browse filesBrowse files
bcoedanielleadams
authored andcommitted
fs: remove experimental from rmdir recursive
Refs: #34278 PR-URL: #35171 Reviewed-By: Christopher Hiller <boneskull@boneskull.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent 862b75d commit fcbdb06
Copy full SHA for fcbdb06

File tree

Expand file treeCollapse file tree

1 file changed

+18
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+18
-4
lines changed
Open diff view settings
Collapse file

‎doc/api/fs.md‎

Copy file name to clipboardExpand all lines: doc/api/fs.md
+18-4Lines changed: 18 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -3502,8 +3502,6 @@ changes:
35023502
it will emit a deprecation warning with id DEP0013.
35033503
-->
35043504

3505-
> Stability: 1 - Recursive removal is experimental.
3506-
35073505
* `path` {string|Buffer|URL}
35083506
* `options` {Object}
35093507
* `maxRetries` {integer} If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
@@ -3526,6 +3524,12 @@ to the completion callback.
35263524
Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on
35273525
Windows and an `ENOTDIR` error on POSIX.
35283526

3527+
Setting `recursive` to `true` results in behavior similar to the Unix command
3528+
`rm -rf`: an error will not be raised for paths that do not exist, and paths
3529+
that represent files will be deleted. The permissive behavior of the
3530+
`recursive` option is deprecated, `ENOTDIR` and `ENOENT` will be thrown in
3531+
the future.
3532+
35293533
## `fs.rmdirSync(path[, options])`
35303534
<!-- YAML
35313535
added: v0.1.21
@@ -3549,8 +3553,6 @@ changes:
35493553
`file:` protocol. Support is currently still *experimental*.
35503554
-->
35513555

3552-
> Stability: 1 - Recursive removal is experimental.
3553-
35543556
* `path` {string|Buffer|URL}
35553557
* `options` {Object}
35563558
* `maxRetries` {integer} If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
@@ -3570,6 +3572,12 @@ Synchronous rmdir(2). Returns `undefined`.
35703572
Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error
35713573
on Windows and an `ENOTDIR` error on POSIX.
35723574

3575+
Setting `recursive` to `true` results in behavior similar to the Unix command
3576+
`rm -rf`: an error will not be raised for paths that do not exist, and paths
3577+
that represent files will be deleted. The permissive behavior of the
3578+
`recursive` option is deprecated, `ENOTDIR` and `ENOENT` will be thrown in
3579+
the future.
3580+
35733581
## `fs.stat(path[, options], callback)`
35743582
<!-- YAML
35753583
added: v0.0.2
@@ -5451,6 +5459,12 @@ Using `fsPromises.rmdir()` on a file (not a directory) results in the
54515459
`Promise` being rejected with an `ENOENT` error on Windows and an `ENOTDIR`
54525460
error on POSIX.
54535461

5462+
Setting `recursive` to `true` results in behavior similar to the Unix command
5463+
`rm -rf`: an error will not be raised for paths that do not exist, and paths
5464+
that represent files will be deleted. The permissive behavior of the
5465+
`recursive` option is deprecated, `ENOTDIR` and `ENOENT` will be thrown in
5466+
the future.
5467+
54545468
### `fsPromises.stat(path[, options])`
54555469
<!-- YAML
54565470
added: v10.0.0

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.