> For the complete documentation index, see [llms.txt](https://academy.shade.inc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.shade.inc/shade-academy/shade-academy-zh/shadefs/pinning-files-offline.md).

# 离线固定文件

## 固定的工作原理

不同于标准缓存系统，已固定的文件存在于一个独立的存储空间中，不受缓存大小限制或驱逐规则的约束。当你固定内容时，ShadeFS 会创建一个完整的本地副本，并一直保留，直到你明确取消固定。这意味着，无论你配置的缓存大小是多少，只要本地存储能够容纳，你就可以固定任意多的内容。

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

<figure><img src="/files/064ce850fbeb82ce94ca5f21a8b409b799e57636" alt=""><figcaption></figcaption></figure>

## 离线工作

即使离线，已固定的文件也仍然可以完全访问。你在离线时对已固定文件所做的任何更改都会在系统中标记为“脏”，表示它们需要与云端同步。在成功同步之前，这些文件会受到缓存驱逐保护，以确保你重新上线时不会丢失任何工作。

当重新连接或重启 ShadeFS 时，系统会自动识别任何已更改的文件，并将它们与 Shade 云同步。目前，在用户之间发生冲突更改的情况下，最新的修改将优先作为事实来源。

## 固定层级

ShadeFS 通过层级系统处理固定。当处理嵌套文件夹时：

* 固定父文件夹会自动包含其所有内容
* 如果外层文件夹和内层文件夹都已固定，取消固定内层文件夹不会产生任何影响，因为外层文件夹的固定状态具有优先级
* 你可以在未固定的父文件夹中有选择地固定特定文件或文件夹

## 灵活使用

ShadeFS 固定的一大优势是其灵活性：

* 你无需先挂载驱动器即可固定文件
* 你可以固定的内容没有限制（除了你可用的存储空间）
* 固定状态在系统重启和重新连接后仍会保留
* 即使离线，你也可以继续处理已固定的文件

## 管理已固定内容

要固定文件或文件夹：

1. 打开 Shade 应用程序
2. 导航到所需内容
3. 右键单击并选择“固定到缓存”

要取消固定内容：

1. 右键单击已固定的项目
2. 选择“取消固定”

要查看所有已固定的文件或文件夹，你可以导航到 **已固定项目** 页面，你可以在驱动器或工作区级别访问它。


---

# 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, and the optional `goal` query parameter:

```
GET https://academy.shade.inc/shade-academy/shade-academy-zh/shadefs/pinning-files-offline.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
