copy
copy#
- copy(src: Union[str, cloudpathlib.cloudpath.CloudPath, pathlib.Path], dst: Union[str, cloudpathlib.cloudpath.CloudPath, pathlib.Path]) Union[cloudpathlib.cloudpath.CloudPath, pathlib.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