get_local_path#

get_local_path(uri: str, download_dir: str, fs: Optional[FileSystem] = None) str[source]#

Return the path where a local copy of URI should be stored.

If URI is local, return it. If it’s remote, we generate a path for it within download_dir.

Parameters
  • uri (str) – the URI of the file to be copied

  • download_dir (str) – path of the local directory in which files should be copied

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

Returns

a local path

Return type

str