◐ Shell
clean mode source ↗

GH-73991: Rework `pathlib.Path.copytree()` into `copy()` by barneygale · Pull Request #122369 · python/cpython

Rename `pathlib.Path.copy()` to `_copy_file()` (i.e. make it private.)

Rename `pathlib.Path.copytree()` to `copy()`, and add support for copying
non-directories. This simplifies the interface for users, and nicely
complements the upcoming `move()` and `delete()` methods (which will also
accept any type of file.)

@barneygale

nineteendo

@barneygale

nineteendo

@barneygale

AA-Turner

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

AA-Turner

blhsing pushed a commit to blhsing/cpython that referenced this pull request

Aug 22, 2024
…n#122369)

Rename `pathlib.Path.copy()` to `_copy_file()` (i.e. make it private.)

Rename `pathlib.Path.copytree()` to `copy()`, and add support for copying
non-directories. This simplifies the interface for users, and nicely
complements the upcoming `move()` and `delete()` methods (which will also
accept any type of file.)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

@opk12 opk12 mentioned this pull request

Oct 4, 2024