> ## 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

### download\_files

<ul>
  <li>
    download\_files(\
    &#x20;file\_names: string\[],\
    &#x20;read\_offsets: number\[],\
    &#x20;read\_lengths: number\[],\
    &#x20;options?: Record\<string, string>,\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/typescript/types/GPUdbCallback.md),\
    ): Promise\<[DownloadFilesResponse](https://docs.kinetica.com/content/api/typescript/interfaces/DownloadFilesResponse.md)>

    Downloads one or more files from KiFS.

    #### Parameters

    <ul>
      <li>
        file\_names: string\[]

        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: number\[]

        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: number\[]

        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>
        `Optional`options: Record\<string, string>

        Optional parameters.
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/typescript/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[DownloadFilesResponse](https://docs.kinetica.com/content/api/typescript/interfaces/DownloadFilesResponse.md)>

    Promise\<Types.DownloadFilesResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:8125](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L8125)</li>
    </ul>
  </li>
</ul>

### download\_files\_request

<ul>
  <li>
    download\_files\_request(\
    &#x20;request: [DownloadFilesRequest](https://docs.kinetica.com/content/api/typescript/interfaces/DownloadFilesRequest.md),\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/typescript/types/GPUdbCallback.md),\
    ): Promise\<[DownloadFilesResponse](https://docs.kinetica.com/content/api/typescript/interfaces/DownloadFilesResponse.md)>

    Downloads one or more files from KiFS.

    #### Parameters

    <ul>
      <li>
        request: [DownloadFilesRequest](https://docs.kinetica.com/content/api/typescript/interfaces/DownloadFilesRequest.md)

        Request object containing the parameters for the operation
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/typescript/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[DownloadFilesResponse](https://docs.kinetica.com/content/api/typescript/interfaces/DownloadFilesResponse.md)>

    Promise\<Types.DownloadFilesResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:8086](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L8086)</li>
    </ul>
  </li>
</ul>


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