sync_to_dir#

sync_to_dir(src_dir: str, dst_dir_uri: str, delete: bool = False, fs: Optional[FileSystem] = None)[source]#

Synchronize a local source directory to destination directory.

Transfers files from source to destination directories so that the destination has all the source files. If FileSystem is remote, this involves uploading.

Parameters
  • src_dir (str) – path of local source directory

  • dst_dir_uri (str) – URI of destination directory

  • delete (bool) – if True, delete files in the destination to match those in the source directory

  • fs (Optional[FileSystem]) – if supplied, use fs instead of automatically chosen FileSystem for dst_dir_uri