olares-files
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesefiles (per-user files-backend)
files(每个用户的文件后端)
Shared front door: loadfor suite routing, active-profile selection, platform entry points, and the auth proceed/stop gate. Load its auth reference only when login, profile switching, token storage, or auth recovery is actually needed.../olares-shared/SKILL.md
Load the shared platform model when the task depends on userspace backends, durability, uid 1000, or system-managed Home directories. Use for syntax.
olares-cli files <verb> --help共享入口:加载以进行套件路由、激活配置文件选择、平台入口点设置以及认证继续/拦截控制。仅在实际需要登录、切换配置文件、存储令牌或恢复认证时,才加载其认证参考内容。../olares-shared/SKILL.md
当任务依赖用户空间后端、持久性存储、UID 1000 或系统管理的主目录时,加载共享的平台模型。使用 查看语法说明。
olares-cli files <verb> --helpWhen to use
使用场景
- Address, read, write, move, delete, share, or transfer known Olares file paths.
- Compress/extract or manage their asynchronous task queue.
- Mount SMB/NFS servers or manage Seafile repositories.
Finding files by name/content (and what the index covers — filenames everywhere vs. full-text only in) lives in/Documents/; configure which directories get full-text indexing viaolares-searchinsettings search dirs.olares-settings
- 定位、读取、写入、移动、删除、共享或传输已知的 Olares 文件路径。
- 压缩/解压文件或管理其异步任务队列。
- 挂载 SMB/NFS 服务器或管理 Seafile 仓库。
按名称/内容查找文件(以及索引覆盖范围——所有位置的文件名 vs 仅下的全文检索)功能在/Documents/中实现;可通过olares-search中的olares-settings配置哪些目录启用全文索引。settings search dirs
Paths and namespace support
路径与命名空间支持
Every resource uses . Before invoking a verb, confirm its namespace support and whether the target is a file or directory. Load path grammar and namespace rules whenever constructing or interpreting a path.
fileType/extend[/subPath]每个资源都使用 格式。调用动词前,请确认其命名空间支持情况以及目标是文件还是目录。构建或解析路径时,请查阅路径语法与命名空间规则。
fileType/extend[/subPath]Backend quirks that change decisions
影响决策的后端特性
- Directory creation may auto-rename on collision instead of returning conflict. Upload does not pre-create destination directories. If exact naming matters, inspect the parent and create it deliberately.
- Direct raw GET of a file resource may return HTTP 500. Use or
files cat; do not retry the raw resource URL.files download - is a virtual volume picker, not a write destination. Writes need
external/<node>/.external/<node>/<volume>/... - Eleven reserved names are system-managed at the first level under .
drive/Home/,rename, andrmas a source are refused before any request goes out;mvand everything nested stay editable. The refusal enumerates all eleven and is a platform invariant, not a permission error to retry — act on a child instead. The names are matched exactly, so a name that merely looks similar is not protected.cp - is valid storage but not a concrete dataset for share creation; share
cache/<node>/.cache/<node>/<sub>/
- 目录创建时若重名可能自动重命名,而非返回冲突。上传操作不会预先创建目标目录。若对命名有严格要求,请先检查父目录并手动创建。
- 直接 GET 文件资源可能返回 HTTP 500。请使用 或
files cat;不要重试原始资源 URL。files download - 是虚拟卷选择器,而非写入目标。写入需使用
external/<node>/格式。external/<node>/<volume>/... - 下一级有 11 个保留名称由系统管理。
drive/Home/、rename和rm操作将拒绝以这些名称作为源路径,且该拒绝会列出所有 11 个名称,这是平台固定规则,而非权限错误,无需重试——请操作其子目录即可。名称为精确匹配,仅相似的名称不受保护。mv - 是有效的存储位置,但不能作为创建共享的具体数据集;请共享
cache/<node>/。cache/<node>/<sub>/
Async task queue (compress / extract)
异步任务队列(压缩/解压)
- and
compressenqueue server-side work and return a task id unless waiting.extract - Ctrl-C stops only the local poll. Cancel the server task explicitly if that is the user's intent.
- Tasks are per-node; retain the node printed when the task was queued.
- affects every task on the node, including work started elsewhere.
task cancel --all
- 和
compress会将工作加入服务器端队列并返回任务 ID(除非等待执行完成)。extract - Ctrl-C 仅停止本地轮询。若用户意图取消任务,请显式取消服务器端任务。
- 任务按节点划分;请保留任务入队时打印的节点信息。
- 会影响该节点上的所有任务,包括其他地方启动的任务。
task cancel --all
Version gate (Olares >= 1.12.6)
版本要求(Olares >= 1.12.6)
Archives, NFS, and require Olares 1.12.6+. Treat daily builds by their base. Follow the shared auth/version gate when the backend version cannot be established.
drive/Commonmajor.minor.patch归档、NFS 以及 功能需要 Olares 1.12.6 及以上版本。每日构建版本按其 基础版本处理。当无法确定后端版本时,请遵循共享的认证/版本控制规则。
drive/Commonmajor.minor.patchVerb index
动词索引
| Verb | Read when triggered |
|---|---|
| listing and cloud shapes |
| |
| resume, overwrite, directory downloads |
| collision decisions and cloud transfer |
| text/size guards and writeback |
| parents, auto-rename, external depth |
| existence, directory intent, protected paths |
| in-place rename and protected paths |
| destination and overwrite semantics |
| UID and namespace decisions |
| formats, conflicts, passwords, async task |
| destination, conflicts, passwords, async task |
| read-only archive inspection |
| per-node cancel/pause/resume |
| internal/public/SMB sharing |
| discovery, mount, history |
| export discovery and mount |
| |
| 动词 | 触发时需查阅的文档 |
|---|---|
| 列表与云端形态 |
| |
| 断点续传、覆盖、目录下载 |
| 冲突处理与云端传输 |
| 文本/大小限制与回写 |
| 父目录、自动重命名、外部存储深度 |
| 存在性、目录操作意图、受保护路径 |
| 原地重命名与受保护路径 |
| 目标路径与覆盖规则 |
| UID 与命名空间决策 |
| 格式、冲突、密码、异步任务 |
| 目标路径、冲突、密码、异步任务 |
| 只读归档文件检查 |
| 按节点取消/暂停/恢复 |
| 内部/公共/SMB 共享 |
| 发现、挂载、历史记录 |
| 导出发现与挂载 |
| |
Safety contract
安全约定
- Treat the user's requested file operation and named paths as task-scope authorisation. Ask again only when a target is ambiguous, bytes may be overwritten without explicit intent, deletion expands beyond the named target, or the action leaves that scope.
- For upload, first decide whether collision should overwrite, fail, or create a distinct name; backend auto-renaming is not an acceptable implicit decision.
- Do not retry a missing-path preflight by weakening safety flags.
- Confirm separately because it affects unrelated work on that node.
task cancel --all - Never expose tokens or passwords. Use stdin-based secret input where available.
- Stop on ambiguous frontend paths, node/volume identity, overwrite intent, or concurrent deletion; re-list the parent and ask the user.
- 将用户请求的文件操作和指定路径视为任务范围的授权。仅当目标不明确、可能无明确意图覆盖文件内容、删除范围超出指定目标或操作超出该范围时,才需再次确认。
- 对于上传操作,首先决定冲突时应覆盖、失败还是创建新名称;后端自动重命名不是可接受的隐式决策。
- 不要通过弱化安全标志来重试路径不存在的预检查。
- 需单独确认,因为它会影响该节点上的无关任务。
task cancel --all - 绝不能暴露令牌或密码。尽可能使用基于标准输入的机密输入方式。
- 当前端路径、节点/卷标识、覆盖意图或并发删除不明确时,停止操作;重新列出父目录并询问用户。