Function gcs_download_file

Source
pub fn gcs_download_file(path: &str) -> Result<String>
Expand description

Download a file from GCS and return the local filename. The GCS path should be in the format gs://bucket_name/prefix.

§Arguments

  • path - A string slice that holds the GCS path.

§Returns

A string with the local filename.

§Errors

This function returns an error if the GCS client cannot be created or the object cannot be downloaded.

§Panics

This function panics if the GCS path is invalid.