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

# DownloadOptions

> DownloadOptions — 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#L97-L100)&#x20;

<pre>`pub struct DownloadOptions {    pub overwrite_existing: bool,}`</pre>

Options for file download operations.The default options, which a download given none uses, overwrite existing files.

## Example

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

// The default options (overwrite existing files)
let options = DownloadOptions::default();
assert!(options.is_overwrite_existing());

// Options that keep existing files
let options = DownloadOptions::default().with_overwrite_existing(false);
assert!(!options.is_overwrite_existing());
```

Fields
`overwrite_existing: bool`

Whether to overwrite existing files on the local file system.

## Implementations

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

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L113-L116)
pub fn [with\_overwrite\_existing](#method.with_overwrite_existing)(self, overwrite: [bool](https://doc.rust-lang.org/1.98.1/std/primitive.bool.html)) -> Self

Sets whether to overwrite existing local files.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L119-L121)
pub fn [set\_overwrite\_existing](#method.set_overwrite_existing)(\&mut self, overwrite: [bool](https://doc.rust-lang.org/1.98.1/std/primitive.bool.html))

Sets whether to overwrite existing local files.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L124-L126)
pub fn [is\_overwrite\_existing](#method.is_overwrite_existing)(\&self) -> [bool](https://doc.rust-lang.org/1.98.1/std/primitive.bool.html)

Returns whether overwriting existing files is enabled.

## Trait Implementations

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

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L96)
fn [clone](https://doc.rust-lang.org/1.98.1/core/clone/trait.Clone.html#tymethod.clone)(\&self) -> [DownloadOptions](https://docs.kinetica.com/content/api/rust/filesystem/struct.DownloadOptions.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#L96)
impl [Debug](https://doc.rust-lang.org/1.98.1/core/fmt/trait.Debug.html) for [DownloadOptions](https://docs.kinetica.com/content/api/rust/filesystem/struct.DownloadOptions.md)

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/filesystem/options.rs#L96)
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#L102-L109)
impl [Default](https://doc.rust-lang.org/1.98.1/core/default/trait.Default.html) for [DownloadOptions](https://docs.kinetica.com/content/api/rust/filesystem/struct.DownloadOptions.md)

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

The default options: overwriting existing files.


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