cpython icon indicating copy to clipboard operation
cpython copied to clipboard

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

Open barneygale opened this issue 1 year ago • 0 comments

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().

  • Issue: gh-73991

📚 Documentation preview 📚: https://cpython-previews--119060.org.readthedocs.build/

barneygale avatar May 15 '24 00:05 barneygale