On Tue, Oct 18, 2022 at 5:00 PM Chris Angelico <rosuav@gmail.com> wrote:
On Wed, 19 Oct 2022 at 06:50, Todd <toddrjen@gmail.com> wrote:
>
> Currently, pathlib supports pretty much all common filesystem operations. You can create, move, and delete both files and directories. One big omission is copying. You need shutil for that.
>
> Whatever the original intent might have been behind pathlib, it is now effectively the standard tool for filesystem operations. As such, excluding copying alone from basic operations creates an unnecessary hurdle for users. It also increases the difficulty of doing such operations since there is no hint within the pathlib documentation on how to copy, new users basically need to google it to find out.  That is fine for less common operations, but far from ideal from a basic one like copying.
>

Ah. I would look at solving this the other way: since this really
isn't a path operation (in the same sense that moving/renaming and
deleting are), keep it in shutil, but improve discoverability with a
docs reference.

ChrisA

How is it any less of a "path operation" than moving files, reading and writing files, making directories, and deleting files?