zut.files.copy

zut.files.copy(src: str | Path, dst: str | Path, follow_symlinks=True)

Copy file data and file data and file’s permission mode (which on Windows is only the read-only flag). Other metadata like file’s creation and modification times, are not preserved.

The destination may be a directory (in this case, the file will be copied into dst directory using the base filename from src).

If follow_symlinks is False, dst will be created as a symbolic link if src is a symbolic link. If follow_symlinks is True, dst will be a copy of the file src refers to.