> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# download_files

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/download_files.rs#L33-L46)
pub async fn [download\_files](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/download-files.md#method.download_files)( \&self, file\_names: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, read\_offsets: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[i64](https://doc.rust-lang.org/1.98.1/std/primitive.i64.html)>, read\_lengths: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[i64](https://doc.rust-lang.org/1.98.1/std/primitive.i64.html)>, ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[DownloadFilesResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.DownloadFilesResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Download one or more files from KiFSDownloads one or more files from KiFS.

##### Arguments

<ul>
  <li>
    `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.
  </li>

  <li>
    `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.
  </li>

  <li>
    `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.
  </li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/download_files.rs#L71-L91)
pub async fn [download\_files\_with\_opts](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/download-files.md#method.download_files_with_opts)( \&self, file\_names: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, read\_offsets: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[i64](https://doc.rust-lang.org/1.98.1/std/primitive.i64.html)>, read\_lengths: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[i64](https://doc.rust-lang.org/1.98.1/std/primitive.i64.html)>, options: [DownloadFilesRequestOptions](https://docs.kinetica.com/content/api/rust/generated/api/struct.DownloadFilesRequestOptions.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[DownloadFilesResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.DownloadFilesResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Download one or more files from KiFSDownloads one or more files from KiFS.

##### Arguments

<ul>
  <li>
    `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.
  </li>

  <li>
    `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.
  </li>

  <li>
    `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.
  </li>

  <li>
    `options` - The optional parameters; any left unset take the server’s defaults.
  </li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/download_files.rs#L94-L105)
pub async fn [download\_files\_raw](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/download-files.md#method.download_files_raw)( \&self, request: &[DownloadFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.DownloadFilesRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[DownloadFilesResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.DownloadFilesResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`DownloadFilesRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.DownloadFilesRequest) to the `/download/files` endpoint.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/download_files.rs#L109-L121)
pub async fn [download\_files\_from\_url](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/download-files.md#method.download_files_from_url)( \&self, url: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html), request: &[DownloadFilesRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.DownloadFilesRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[DownloadFilesResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.DownloadFilesResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`DownloadFilesRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.DownloadFilesRequest) to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.