diff options
author | bcoe <bencoe@google.com> | 2020-10-02 00:40:50 +0300 |
---|---|---|
committer | Benjamin Coe <bencoe@google.com> | 2020-10-03 21:39:37 +0300 |
commit | 35b17d9abd123853a8e035ca7bc185f7e942d73b (patch) | |
tree | f671805f1ecf7ef9d6965e1660aad264c84c038e | |
parent | 6139e58fcb1269ff411299ba7b2b67363b262ff3 (diff) |
fs: remove experimental from rmdir recursive
Refs: https://github.com/nodejs/node/issues/34278
PR-URL: https://github.com/nodejs/node/pull/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>
-rw-r--r-- | doc/api/fs.md | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/doc/api/fs.md b/doc/api/fs.md index fa369c12583..291e920f0e1 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -3522,8 +3522,6 @@ changes: it will emit a deprecation warning with id DEP0013. --> -> Stability: 1 - Recursive removal is experimental. - * `path` {string|Buffer|URL} * `options` {Object} * `maxRetries` {integer} If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or @@ -3546,6 +3544,12 @@ to the completion callback. Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on Windows and an `ENOTDIR` error on POSIX. +Setting `recursive` to `true` results in behavior similar to the Unix command +`rm -rf`: an error will not be raised for paths that do not exist, and paths +that represent files will be deleted. The permissive behavior of the +`recursive` option is deprecated, `ENOTDIR` and `ENOENT` will be thrown in +the future. + ## `fs.rmdirSync(path[, options])` <!-- YAML added: v0.1.21 @@ -3569,8 +3573,6 @@ changes: `file:` protocol. Support is currently still *experimental*. --> -> Stability: 1 - Recursive removal is experimental. - * `path` {string|Buffer|URL} * `options` {Object} * `maxRetries` {integer} If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or @@ -3590,6 +3592,12 @@ Synchronous rmdir(2). Returns `undefined`. Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error on Windows and an `ENOTDIR` error on POSIX. +Setting `recursive` to `true` results in behavior similar to the Unix command +`rm -rf`: an error will not be raised for paths that do not exist, and paths +that represent files will be deleted. The permissive behavior of the +`recursive` option is deprecated, `ENOTDIR` and `ENOENT` will be thrown in +the future. + ## `fs.stat(path[, options], callback)` <!-- YAML added: v0.0.2 @@ -5475,6 +5483,12 @@ Using `fsPromises.rmdir()` on a file (not a directory) results in the `Promise` being rejected with an `ENOENT` error on Windows and an `ENOTDIR` error on POSIX. +Setting `recursive` to `true` results in behavior similar to the Unix command +`rm -rf`: an error will not be raised for paths that do not exist, and paths +that represent files will be deleted. The permissive behavior of the +`recursive` option is deprecated, `ENOTDIR` and `ENOENT` will be thrown in +the future. + ### `fsPromises.stat(path[, options])` <!-- YAML added: v10.0.0 |