On Tue, Oct 18, 2022, 19:39 Paul Bryan wrote:
> For my edification, how is copy in pathlib proposed to be implemented?
> Just call out to the OS to do the copy? Do the copy by reading and writing?
>
Just a thin wrapper around shutil.copy2 and shutil.copytree. Most
non-parsing pathlib operations
pyfilemods is a generated reference of file/path modules and their methods.
>From https://github.com/westurner/pyfilemods#copy (w/ all due respect to
licenses) :
Modules
+
- os
- Source: https://github.com/python/cpython/tree/3.6/Lib/os.py
- Docs: https://docs.python.org/3/library/os.
For my edification, how is copy in pathlib proposed to be implemented?
Just call out to the OS to do the copy? Do the copy by reading and
writing?
On Tue, 2022-10-18 at 19:24 -0400, Todd wrote:
> On Tue, Oct 18, 2022 at 6:26 PM Chris Angelico
> wrote:
> > On Wed, 19 Oct 2022 at 09:17, Todd wrote
On Tue, Oct 18, 2022 at 6:26 PM Chris Angelico wrote:
> On Wed, 19 Oct 2022 at 09:17, Todd wrote:
> >
> > On Tue, Oct 18, 2022 at 5:00 PM Chris Angelico wrote:
> >>
> >> On Wed, 19 Oct 2022 at 06:50, Todd wrote:
> >> >
> >> > Currently, pathlib supports pretty much all common filesystem
> oper
On 10/18/22, Todd wrote:
>
> So I think it would make a lot of sense to include copying inside pathlib.
> I propose adding a `copy` method to `pathlib.Path` (for concrete paths).
>
> The specific call signature would be:
>
> copy(dst, *, follow_symlinks=True, recursive=True, dir_exist_ok=True)
>
>
On 10/18/22, Todd wrote:
>
> How is it any less of a "path operation" than moving files, reading and
> writing files, making directories, and deleting files?
Path-related operations involve creating, linking, symlinking, and
listing directories and files, and peripherally also accessing file
meta
On Wed, 19 Oct 2022 at 09:17, Todd wrote:
>
> On Tue, Oct 18, 2022 at 5:00 PM Chris Angelico wrote:
>>
>> On Wed, 19 Oct 2022 at 06:50, Todd wrote:
>> >
>> > Currently, pathlib supports pretty much all common filesystem operations.
>> > You can create, move, and delete both files and directorie
On Tue, Oct 18, 2022 at 5:00 PM Chris Angelico wrote:
> On Wed, 19 Oct 2022 at 06:50, Todd 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 th
> On 18 Oct 2022, at 21:59, Chris Angelico wrote:
>
> On Wed, 19 Oct 2022 at 06:50, Todd 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 fo
> improve discoverability with a
> docs reference.
This is a great idea — I suggest a PR would be in order, and the good news
is that a doc addition could be back-ported to all supported versions.
However, I don’t agree that copy does not belong on pathlib. I get the
point, but practically beat
On Wed, 19 Oct 2022 at 06:50, Todd 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
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 fil
12 matches
Mail list logo