Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JasonGross opened this issue Oct 18, 2024 · 0 comments
Open

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

JasonGross opened this issue Oct 18, 2024 · 0 comments
Labels
docs Documentation in the Doc dir

Comments

@JasonGross
Copy link

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?

@JasonGross JasonGross added the docs Documentation in the Doc dir label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

1 participant