mmengine.fileio.copytree¶
- mmengine.fileio.copytree(src, dst, backend_args=None)[源代码]¶
Recursively copy an entire directory tree rooted at src to a directory named dst and return the destination directory.
src and dst should have the same prefix and dst must not already exist.
- 参数
- 返回
The destination directory.
- 返回类型
- 引发
FileExistsError – If dst had already existed, a FileExistsError will be raised.
实际案例
>>> src = '/path/of/dir1' >>> dst = '/path/of/dir2' >>> copytree(src, dst) '/path/of/dir2'