# Pinning Files Offline

## How Pinning Works

Unlike the standard cache system, pinned files exist in a separate storage space that isn't subject to cache size limitations or eviction rules. When you pin content, ShadeFS creates a complete local copy that persists until you explicitly unpin it. This means you can pin as much content as your local storage can accommodate, regardless of your configured cache size.

{% embed url="<https://youtu.be/apDcYPUC7tw?si=LB3hSQr8zL2Ow_Md>" %}

<figure><img src="/files/epJ8KnPfi9czWwBqm1pT" alt=""><figcaption></figcaption></figure>

## Working Offline

Pinned files remain fully accessible even offline. Any changes you make to pinned files while offline are marked as "dirty" in the system, indicating they need to be synchronized with the cloud. These files are protected from cache eviction until they can be successfully synchronized to ensure no work is lost when you come back online.

When reconnecting or restarting ShadeFS, the system automatically identifies any changed files and synchronizes them with the Shade cloud. Currently, in cases of conflicting changes between users, the most recent modification takes precedence as the source of truth.

## Pinning Hierarchy

ShadeFS handles pinning with a hierarchy system. When working with nested folders:

* Pinning a parent folder automatically includes all its contents
* If both an outer folder and an inner folder are pinned, unpinning the inner folder won't have any effect as the outer folder's pin status takes precedence
* You can selectively pin specific files or folders within an unpinned parent folder

## Flexible Usage

A key advantage of ShadeFS pinning is its flexibility:

* You can pin files without mounting the drive first
* There's no limit to how much content you can pin (beyond your available storage)
* Pinned status persists across system restarts and reconnections
* You can continue to work with pinned files even when offline

## Managing Pinned Content

To pin files or folders:

1. Open the Shade application
2. Navigate to the desired content
3. Right-click and select "Pin to Cache"

To unpin content:

1. Right-click the pinned item
2. Select "Unpin"

To view all pinned files or folders, you can navigate to the **Pinned Items** page, which you can access at the drive or the workspace level.


---

# 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://academy.shade.inc/shadefs/pinning-files-offline.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.
