diff options
author | Ian Sutherland <ian@iansutherland.ca> | 2020-10-08 15:21:56 -0600 |
---|---|---|
committer | Benjamin Coe <bencoe@google.com> | 2020-10-14 18:56:40 -0700 |
commit | 2002d90abdf91e862294daab90661aa62b4dabe3 (patch) | |
tree | b7f06af2b1fce35ce9b55d4947ede71e31e3a7ce /doc/api/deprecations.md | |
parent | ab0af50ef8cd18eff18918cf380ad1127d4c4a24 (diff) | |
download | node-new-2002d90abdf91e862294daab90661aa62b4dabe3.tar.gz |
fs: deprecation warning on recursive rmdir
This is a follow up to #35494 to add a deprecation warning when
using recursive rmdir. This only warns if you are attempting
to remove a file or a nonexistent path.
PR-URL: https://github.com/nodejs/node/pull/35562
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'doc/api/deprecations.md')
-rw-r--r-- | doc/api/deprecations.md | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 32ddc5f16a..60cf45672b 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2666,12 +2666,15 @@ changes: - version: REPLACEME pr-url: https://github.com/nodejs/node/pull/35579 description: Documentation-only deprecation. + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/35562 + description: Runtime deprecation. --> -Type: Documentation-only +Type: Runtime In future versions of Node.js, `fs.rmdir(path, { recursive: true })` will throw -on nonexistent paths, or when given a file as a target. +if `path` does not exist or is a file. Use `fs.rm(path, { recursive: true, force: true })` instead. [Legacy URL API]: url.md#url_legacy_url_api |