PyDocs

Nav

File and Directory Access

copyfile

shutil

function (source)
  • copyfile(src, dst, *, follow_symlinks=True)
Copy data from src to dst in the most efficient way possible.

If follow_symlinks is not set and src is a symbolic link, a new
symlink will be created instead of copying the file it points to.
Changed in 3.3, 3.4, 3.8
  • 3.3: IOError used to be raised instead of OSError. Added follow_symlinks argument. Now returns dst.
  • 3.4: Raise SameFileError instead of Error. Since the former is a subclass of the latter, this change is backward compatible.
  • 3.8: Platform-specific fast-copy syscalls may be used internally in order to copy the file more efficiently. See Platform-dependent efficient copy operations section.
0 Examples
No examples for shutil/copyfile.
See Also
No see-alsos for shutil/copyfile
0 Notes
No notes for copyfile