> For the complete documentation index, see [llms.txt](https://docs.redivis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.redivis.com/api/client-libraries/redivis-python/reference/directory/directory.download.md).

# Directory.download

### Directory.<mark style="color:purple;">download</mark>(*path, \*, overwrite=False, max\_results=None, progress=True, max\_parallelization=None, max\_concurrency=None*) → *void*

Downloads files in the directory to the specified path.

### **Parameters:**

**`path` :&#x20;*****str*****&#x20;| pathlib.Path**\
The path of the directory to download files. Will automatically create the directory if it doesn't exist. If not specified, defaults to `Path.cwd() / Directory.name` .

**`overwrite` :&#x20;*****bool, default False***\
Whether to overwrite any existing files when downloading. If False, will throw an error if a file with the same name already exists at the provided path.

**`max_results` :&#x20;*****int, default None***\
If specified, will only download up to the specified number of files

**`progress` :&#x20;*****bool, default True***\
Whether to show the progress bar.

**`max_parallelization` :&#x20;*****int, default None***\
The maximum number of threads to use to download files. If unset (recommended), will be determined dynamically based on the number of files, their size, and available cores on your machine.

**`max_concurrency` :&#x20;*****int, default None***\
The maximum total concurrency when downloading files. Should be higher than max\_parallelization, as multiple files are downloaded concurrently per thread. If unset (recommended), will be determined dynamically based on the number of files, their size, and available cores on your machine.

### **Returns:**&#x20;

**void**

### Examples:

```python
import redivis

dir = redivis.table("table_ref").to_directory()

file = dir.get("path/to/file.txt") # Will return None if doesn't exist
subdir = dir.get("path/to/subdir")

print(subdir.get("../").path) # -> "/path/to"
rootdir = subdir.get("/")
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.redivis.com/api/client-libraries/redivis-python/reference/directory/directory.download.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
