astro.utils.load
Module Contents
Functions
|
Copy the contents of a file (which may be available locally or remotely) to a local file. |
- astro.utils.load.copy_remote_file_to_local(source_filepath, target_filepath=None, is_binary=False, transport_params=None)
Copy the contents of a file (which may be available locally or remotely) to a local file. If no target_filepath is specified, creates one, and returns it.
- Parameters:
source_filepath (str) – Local filepath or remote URI of the source file
target_filepath (str) – (optional) Destination filepath in the local filesystem
is_binary (bool) – If the given file is binary or not
transport_params (dict) – Necessary parameters to connect to object store, in case the file is in (S3, GCS)
- Returns:
Target file path
- Return type:
str