# Whitelisting files & directories

By default, only a limited set of directories are accessible through the File System API.\
\
This restriction is to protect your users in the event that malicious or unintended code runs inside your app. \
\
While this scenario is unlikely when following recommended security practices, the possibility of a remote code exploit is never zero, so limiting file system access reduces potential damage.

***

The default whitelisted directories are:

* The [desktop folder](/deskifier/deskifier-bubble.io-docs/filesystem-element/states.md#desktop-folder-directory). (Except on Mac App Store builds)
* The [documents folder.](/deskifier/deskifier-bubble.io-docs/filesystem-element/states.md#documents-folder-directory)
* The [downloads folder](/deskifier/deskifier-bubble.io-docs/filesystem-element/states.md#downloads-folder-directory).
* The [music folder](/deskifier/deskifier-bubble.io-docs/filesystem-element/states.md#music-folder-directory).
* The [pictures folder](/deskifier/deskifier-bubble.io-docs/filesystem-element/states.md#music-folder-directory-1).
* The [videos folder](/deskifier/deskifier-bubble.io-docs/filesystem-element/states.md#videos-folder-directory).
* The [appData folder](/deskifier/deskifier-bubble.io-docs/filesystem-element/states.md#appdata-folder-directory).
* The [temp folder](/deskifier/deskifier-bubble.io-docs/filesystem-element/states.md#temp-folder-directory).
* The [executable folder](/deskifier/deskifier-bubble.io-docs/filesystem-element/states.md#executable-folder-directory).

***

Files outside the whitelist are still partially visible to the application, but only limited actions are allowed.\
\
For unwhitelisted paths, the application can only:\
1\. See the file name or folder in a directory.\
2\. Open the file or directory in the system's native file explorer via the [File System - Show In Folder](/deskifier/deskifier-bubble.io-docs/filesystem-element/actions.md#file-system-show-in-folder) action.

***

If your application needs access to additional locations, those paths can become whitelisted **during the user's session**.

However, for security reasons, this can only happen through **explicit user actions**. Your application cannot whitelist paths silently or automatically.\
\
These user gestures include:\
\
1\. The user choosing a save as path from the [Show Save Dialog](/deskifier/deskifier-bubble.io-docs/dialog-element/actions.md#show-save-dialog). This will whitelist the path, so that your application can modify/create files at that given path.\
\
2\. The user choosing paths from the [Show Open Dialog](/deskifier/deskifier-bubble.io-docs/dialog-element/actions.md#show-save-dialog). This will whitelist the path, so that your application can modify/create files at that given path.\
\
3\. The user [dragging and dropping files](/deskifier/deskifier-bubble.io-docs/guides-and-examples/dragging-and-dropping-files.md) onto your application. (Except for Mac App Store builds)\
\
4\. The user choosing a download path when [requesting a download](/deskifier/deskifier-bubble.io-docs/filesystem-element/actions.md#file-system-request-download).


---

# Agent Instructions: 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://deskifier.gitbook.io/deskifier/deskifier-bubble.io-docs/guides-and-examples/whitelisting-files-and-directories.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.
