mmengine.fileio.copyfile_from_local¶
- mmengine.fileio.copyfile_from_local(src, dst, backend_args=None)[源代码]¶
Copy a local file src to dst and return the destination file.
注解
If the backend is the instance of LocalBackend, it does the same thing with
copyfile()
.- 参数
- 返回
If dst specifies a directory, the file will be copied into dst using the base filename from src.
- 返回类型
实际案例
>>> # dst is a file >>> src = '/path/of/file' >>> dst = 's3://openmmlab/mmengine/file1' >>> # src will be copied to 's3://openmmlab/mmengine/file1' >>> copyfile_from_local(src, dst) s3://openmmlab/mmengine/file1
>>> # dst is a directory >>> dst = 's3://openmmlab/mmengine' >>> # src will be copied to 's3://openmmlab/mmengine/file'' >>> copyfile_from_local(src, dst) 's3://openmmlab/mmengine/file'