Skip to main content
Source

pub async fn download_files( &self, file_names: Vec<String>, read_offsets: Vec<i64>, read_lengths: Vec<i64>, ) -> Result<DownloadFilesResponse, KineticaError>

Download one or more files from KiFS

Downloads one or more files from KiFS.

  • file_names - An array of the file names to download from KiFS. File paths may contain wildcard characters after the KiFS directory delimiter.

    Accepted wildcard characters are asterisk (*) to represent any string of zero or more characters, and question mark (?) to indicate a single character.

  • read_offsets - An array of starting byte offsets from which to read each respective file in file_names. Must either be empty or the same length as file_names. If empty, files are downloaded in their entirety. If not empty, read_lengths must also not be empty.

  • read_lengths - Array of number of bytes to read from each respective file in file_names. Must either be empty or the same length as file_names. If empty, files are downloaded in their entirety. If not empty, read_offsets must also not be empty.

Source

pub async fn download_files_with_opts( &self, file_names: Vec<String>, read_offsets: Vec<i64>, read_lengths: Vec<i64>, options: DownloadFilesRequestOptions, ) -> Result<DownloadFilesResponse, KineticaError>

Download one or more files from KiFS

Downloads one or more files from KiFS.

  • file_names - An array of the file names to download from KiFS. File paths may contain wildcard characters after the KiFS directory delimiter.

    Accepted wildcard characters are asterisk (*) to represent any string of zero or more characters, and question mark (?) to indicate a single character.

  • read_offsets - An array of starting byte offsets from which to read each respective file in file_names. Must either be empty or the same length as file_names. If empty, files are downloaded in their entirety. If not empty, read_lengths must also not be empty.

  • read_lengths - Array of number of bytes to read from each respective file in file_names. Must either be empty or the same length as file_names. If empty, files are downloaded in their entirety. If not empty, read_offsets must also not be empty.

  • options - The optional parameters; any left unset take the server’s defaults.

Sends a pre-built DownloadFilesRequest to the /download/files endpoint.

Sends a pre-built DownloadFilesRequest to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.