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

# KifsFileHandlerOptions

> KifsFileHandlerOptions — Kinetica Rust API

[gpudb\_api](https://docs.kinetica.com/content/api/rust/index.md)::<wbr />[filesystem](https://docs.kinetica.com/content/api/rust/filesystem/index.md)
[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L172-L191)&#x20;

<pre>`pub struct KifsFileHandlerOptions { /* private fields */ }`</pre>

Options for the KiFS file handler.These options control the behavior of file uploads and downloads, including batch sizes and upload concurrency.The fields are private and are set only through the validating `with_*` methods. A public `file_size_to_split` could be set to 0 or a negative number, which the multi-part part-count arithmetic divides by.

## Example

```rust theme={null}
use gpudb_api::filesystem::KifsFileHandlerOptions;

// Create default options
let options = KifsFileHandlerOptions::default();

// Create custom options
let options = KifsFileHandlerOptions::new()
    .with_file_size_to_split(50 * 1024 * 1024)? // 50 MB
    .with_thread_pool_size(1)?;
```

## Implementations

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L204-L316)
impl [KifsFileHandlerOptions](https://docs.kinetica.com/content/api/rust/filesystem/struct.KifsFileHandlerOptions.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L206-L208)
pub fn [new](#method.new)() -> Self

Creates a new `KifsFileHandlerOptions` with default values.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L219-L227)
pub fn [with\_file\_size\_to\_split](#method.with_file_size_to_split)(self, size: [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)\<Self, [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sets the file size threshold for multi-part transfers.

##### Arguments

<ul>
  <li>`size` - Size in bytes. Must be a positive value \<= 60 MB.</li>
</ul>

##### Errors

Fails if the size is \<= 0 or > 60 MB.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L242-L251)
pub fn [with\_thread\_pool\_size](#method.with_thread_pool_size)(self, size: [usize](https://doc.rust-lang.org/1.98.1/std/primitive.usize.html)) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<Self, [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sets how many full-file upload batches are sent concurrently.Uploads proceed in waves: up to this many batches are sent at once, and the next wave starts when every batch of the current one has finished.

##### Arguments

<ul>
  <li>`size` - Number of concurrent batches. Must be between 1 and the number of available CPUs.</li>
</ul>

##### Errors

Fails if the size is 0 or greater than the number of available CPUs.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L267-L275)
pub fn [with\_max\_upload\_bytes\_in\_flight](#method.with_max_upload_bytes_in_flight)( self, bytes: [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)\<Self, [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sets the ceiling on full-file upload payload bytes held in memory at once.Lower it where memory is tight: an upload then waits for outstanding batches to finish more often, trading throughput for a smaller peak. Raise it for more throughput where memory is plentiful.

##### Arguments

<ul>
  <li>`bytes` - The ceiling in bytes. Must be positive.</li>
</ul>

##### Errors

Fails if `bytes` is \<= 0.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L286-L289)
pub fn [with\_termination\_timeout](#method.with_termination_timeout)(self, timeout: [u64](https://doc.rust-lang.org/1.98.1/std/primitive.u64.html)) -> Self

Sets the timeout for thread pool termination.This has no effect. There are no thread pools to shut down: the upload tasks are awaited to completion, and aborted as soon as the operation’s future is dropped.

##### Arguments

<ul>
  <li>`timeout` - Timeout in seconds.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L292-L294)
pub fn [file\_size\_to\_split](#method.file_size_to_split)(\&self) -> [i64](https://doc.rust-lang.org/1.98.1/std/primitive.i64.html)

Returns the file size threshold for multi-part transfers.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L297-L299)
pub fn [thread\_pool\_size](#method.thread_pool_size)(\&self) -> [usize](https://doc.rust-lang.org/1.98.1/std/primitive.usize.html)

Returns the number of full-file upload batches sent concurrently.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L302-L304)
pub fn [full\_file\_dispatcher\_threadpool\_size](#method.full_file_dispatcher_threadpool_size)(\&self) -> [i32](https://doc.rust-lang.org/1.98.1/std/primitive.i32.html)

Returns the number of full-file upload batches sent concurrently.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L308-L310)
pub fn [max\_upload\_bytes\_in\_flight](#method.max_upload_bytes_in_flight)(\&self) -> [i64](https://doc.rust-lang.org/1.98.1/std/primitive.i64.html)

Returns the ceiling on full-file upload payload bytes held in memory at once.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L313-L315)
pub fn [termination\_timeout](#method.termination_timeout)(\&self) -> [u64](https://doc.rust-lang.org/1.98.1/std/primitive.u64.html)

Returns the termination timeout.

## Trait Implementations

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L171)
impl [Clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html) for [KifsFileHandlerOptions](https://docs.kinetica.com/content/api/rust/filesystem/struct.KifsFileHandlerOptions.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L171)
fn [clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)(\&self) -> [KifsFileHandlerOptions](https://docs.kinetica.com/content/api/rust/filesystem/struct.KifsFileHandlerOptions.md)

Returns a duplicate of the value. [Read more](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)

1.0.0 (const: [unstable](https://github.com/rust-lang/rust/issues/142757)) · [Source](https://doc.rust-lang.org/1.98.1/src/core/clone.rs.html#245-247)
fn [clone\_from](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#method.clone_from)(\&mut self, source: \&Self)

Performs copy-assignment from `source`. [Read more](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#method.clone_from)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L171)
impl [Debug](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html) for [KifsFileHandlerOptions](https://docs.kinetica.com/content/api/rust/filesystem/struct.KifsFileHandlerOptions.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L171)
fn [fmt](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html#tymethod.fmt)(\&self, f: \&mut [Formatter](https://doc.rust-lang.org/1.98.1/core/fmt/struct.Formatter.html)\<'\_>) -> [Result](https://doc.rust-lang.org/1.98.1/core/fmt/type.Result.html)

Formats the value using the given formatter. [Read more](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html#tymethod.fmt)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L193-L202)
impl [Default](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html) for [KifsFileHandlerOptions](https://docs.kinetica.com/content/api/rust/filesystem/struct.KifsFileHandlerOptions.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L194-L201)
fn [default](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html#tymethod.default)() -> Self

Returns the “default value” for a type. [Read more](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html#tymethod.default)


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