download_or_copy#
- download_or_copy(uri: str, target_dir: str, delete_tmp: bool = False, fs: rastervision.pipeline.file_system.file_system.FileSystem | None = None) str [source]#
Downloads or copies a file to a directory.
Downloads or copies URI into target_dir.
- Parameters:
uri (str) – URI of file.
target_dir (str) – Local directory to download or copy file to.
delete_tmp (bool) – Delete temporary download dir after copying file.
fs (rastervision.pipeline.file_system.file_system.FileSystem | None) – If supplied, use fs instead of automatically chosen FileSystem for uri.
- Returns:
the local path of file
- Return type: