copy#
- copy(src: Union[str, CloudPath, Path], dst: Union[str, CloudPath, Path]) Union[CloudPath, Path] [source]#
Copy a file or a directory (recursively) with
copytree
orcopy2
.>>> src = 'D:/path/to/copy' >>> dst = 'D:/path/to/output' >>> copy(src, dst) copydir 'D:/path/to/output/copy' >>> src = 'D:/path/to/copy.txt' >>> dst = 'D:/path/to/output/huhu.txt' >>> copyfile = copy(src, dst) 'D:/path/to/output/huhu.txt' but with the content of copy.txt