From 42b65ed97df53a33a35803951e56a45e6e8e6f2e Mon Sep 17 00:00:00 2001 From: bcoe Date: Fri, 9 Oct 2020 14:56:56 -0700 Subject: [PATCH] doc: document rmdir/recursive deprecation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Document deprecation of rmdir/recursive permissive functionality PR-URL: https://github.com/nodejs/node/pull/35579 Refs: https://github.com/nodejs/node/pull/35562 Reviewed-By: Rich Trott Reviewed-By: Antoine du Hamel Reviewed-By: Michaƫl Zasso --- doc/api/deprecations.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index bc693fe561ce0b..0b1b8c5fa23484 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2655,6 +2655,20 @@ Type: Documentation-only The [`crypto.Certificate()` constructor][] is deprecated. Use [static methods of `crypto.Certificate()`][] instead. +### DEP0XXX: `fs.rmdir(path, { recursive: true })` + + +Type: Documentation-only + +In future versions of Node.js, `fs.rmdir(path, { recursive: true })` will throw +on nonexistent paths, or when given a file as a target. +Use `fs.rm(path, { recursive: true, force: true })` instead. + [Legacy URL API]: url.md#url_legacy_url_api [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf [RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3