Add methods that invoke shutil functions

Issue #5 wontfix
Anonymous created an issue

Python newcomers are often baffled by the os / os.path / shutil trifurcation because an intimate knowledge of POSIX is necessary to understand why copying a file is a synthetic user-land operation while removing a file is an atomic operating-system-level command. The pathlib library could remove this confusion once and for all by adding shutil-methods to its objects, putting operations like "copy" alongside semantically equivalent operations like removing a file.

Comments (5)

  1. Antoine Pitrou repo owner

    Any updates on the plan? Is there any work being done or specific design guidelines (assuming you'd let someone else do this)?


    On a methodological standpoint, pathlib is now developed in the Python standard library. This backport (the bitbucket project) will at best only receive bug fixes. So I would recommend creating an issue on

    About the feature request itself, I'm very much open to it, although this will probably require some API discussions. These should happen either on the Python bug tracker, or on the python-dev mailing-list (IMHO). And, yes, I do welcome patches as well.

  2. Log in to comment