Skip to content

shutil.move documentation conflicts with shutil.copy2 documentation #125676

@JasonGross

Description

@JasonGross

Documentation

:func:`copytree` is called, passing it the *copy_function*. The
default *copy_function* is :func:`copy2`. Using :func:`~shutil.copy` as the
*copy_function* allows the move to succeed when it is not possible to also
copy the metadata, at the expense of not copying any of the metadata.

On platforms where some or all of this functionality is
unavailable, :func:`copy2` will preserve all the metadata
it can; :func:`copy2` never raises an exception because it
cannot preserve file metadata.

Which is it? Does copy2 sometimes fail to copy files, or does move work fine even with copy2 on systems that cannot copy all metadata?

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions