upload_or_copy#
- upload_or_copy(src_path: str, dst_uri: str, fs: rastervision.pipeline.file_system.file_system.FileSystem | None = None) None[source]#
Upload or copy a file.
If
dst_uriis local, the file is copied. Otherwise, it is uploaded.- Parameters
src_path (str) – Path to source file.
dst_uri (str) – URI of destination for file.
fs (rastervision.pipeline.file_system.file_system.FileSystem | None) – If supplied, use fs instead of automatically chosen
FileSystemfordst_uri.
- Raises
NotWritableError – if dst_uri cannot be written to
- Return type
None