upload_or_copy#

upload_or_copy(src_path: str, dst_uri: str, fs: Optional[FileSystem] = None) None[source]#

Upload or copy a file.

If dst_uri is 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 (Optional[FileSystem]) – if supplied, use fs instead of automatically chosen FileSystem for dst_uri

Raises

NotWritableError if dst_uri cannot be written to

Return type

None