On Sat, Mar 17, 2018 at 10:42 AM, George Fischhof <geo...@fischhof.hu> wrote: > > All functions from os module accept path-like objects, > and none of the shutil functions.
shutil indirectly supports __fspath__ paths via os and os.path. One exception is shutil.disk_usage() on Windows, which only supports str strings. This is fixed in 3.7, in resolution of issue 32556. Maybe it should be backported to 3.6. I like the idea of a high-level library that provides a subset of commonly used os, io, and shutil functionality in one place. But maybe a new module isn't required. shutil could be extended since its design goal is to provide "high-level operations on files and collections of files". That said, pathlib's goal to support "concrete paths [that] provide I/O operations" does seem incomplete. It should support copy, copytree, rmtree, and move methods. Also, a `parents` option should be added to Path.rmdir to implement removedirs, which mirrors how Path.mkdir implements makedirs. > os.link => path.hardlink_to I'm surprised this doesn't already exist. _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/