SIGN IN SIGN UP

GH-73991: Add `pathlib.Path.rmtree()` (#119060)

Add a `Path.rmtree()` method that removes an entire directory tree, like
`shutil.rmtree()`. The signature of the optional *on_error* argument
matches the `Path.walk()` argument of the same name, but differs from the
*onexc* and *onerror* arguments to `shutil.rmtree()`. Consistency within
pathlib is probably more important.

In the private pathlib ABCs, we add an implementation based on `walk()`.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
B
Barney Gale committed
094375b9b7e087a4f0f60541dc7f2dc53be92646
Parent: 8db5f48
Committed by GitHub <noreply@github.com> on 7/20/2024, 8:14:13 PM