> 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-r/reference/directory/directoryusddownload.md).

# Directory$download

### Directory$<mark style="color:purple;">download</mark>(*path=getwd(), overwrite=FALSE, max\_results=NULL, progress=TRUE, max\_parallelization=NULL, max\_concurrency=NULL*) → void

Downloads files associated with the directory to the specified at path.

### **Parameters:**

**`path` :&#x20;*****str, default getwd()***\
The path of the directory to download files. Will automatically create the directory if it doesn't exist. If not specified, defaults to the current working directory.

**`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, unless if the file is a duplicate.

**`max_results` :&#x20;*****int, default NULL***\
If specified, will only download up to max\_results files

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

**`max_parallelization` :&#x20;*****int, default  NULL***\
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 NULL***\
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**


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.redivis.com/api/client-libraries/redivis-r/reference/directory/directoryusddownload.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
