Skip to content

Commit 35b17d9

Browse files
committedOct 3, 2020
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 6139e58 commit 35b17d9

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed
 

‎doc/api/fs.md

+18-4
Original file line numberDiff line numberDiff line change
@@ -3522,8 +3522,6 @@ changes:
35223522
it will emit a deprecation warning with id DEP0013.
35233523
-->
35243524

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

3547+
Setting `recursive` to `true` results in behavior similar to the Unix command
3548+
`rm -rf`: an error will not be raised for paths that do not exist, and paths
3549+
that represent files will be deleted. The permissive behavior of the
3550+
`recursive` option is deprecated, `ENOTDIR` and `ENOENT` will be thrown in
3551+
the future.
3552+
35493553
## `fs.rmdirSync(path[, options])`
35503554
<!-- YAML
35513555
added: v0.1.21
@@ -3569,8 +3573,6 @@ changes:
35693573
`file:` protocol. Support is currently still *experimental*.
35703574
-->
35713575

3572-
> Stability: 1 - Recursive removal is experimental.
3573-
35743576
* `path` {string|Buffer|URL}
35753577
* `options` {Object}
35763578
* `maxRetries` {integer} If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
@@ -3590,6 +3592,12 @@ Synchronous rmdir(2). Returns `undefined`.
35903592
Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error
35913593
on Windows and an `ENOTDIR` error on POSIX.
35923594

3595+
Setting `recursive` to `true` results in behavior similar to the Unix command
3596+
`rm -rf`: an error will not be raised for paths that do not exist, and paths
3597+
that represent files will be deleted. The permissive behavior of the
3598+
`recursive` option is deprecated, `ENOTDIR` and `ENOENT` will be thrown in
3599+
the future.
3600+
35933601
## `fs.stat(path[, options], callback)`
35943602
<!-- YAML
35953603
added: v0.0.2
@@ -5475,6 +5483,12 @@ Using `fsPromises.rmdir()` on a file (not a directory) results in the
54755483
`Promise` being rejected with an `ENOENT` error on Windows and an `ENOTDIR`
54765484
error on POSIX.
54775485

5486+
Setting `recursive` to `true` results in behavior similar to the Unix command
5487+
`rm -rf`: an error will not be raised for paths that do not exist, and paths
5488+
that represent files will be deleted. The permissive behavior of the
5489+
`recursive` option is deprecated, `ENOTDIR` and `ENOENT` will be thrown in
5490+
the future.
5491+
54785492
### `fsPromises.stat(path[, options])`
54795493
<!-- YAML
54805494
added: v10.0.0

0 commit comments

Comments
 (0)
Please sign in to comment.