olares-files

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

files (per-user files-backend)

files(每个用户的文件后端)

Shared front door: load
../olares-shared/SKILL.md
for 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.
Load the shared platform model when the task depends on userspace backends, durability, uid 1000, or system-managed Home directories. Use
olares-cli files <verb> --help
for syntax.
共享入口:加载
../olares-shared/SKILL.md
以进行套件路由、激活配置文件选择、平台入口点设置以及认证继续/拦截控制。仅在实际需要登录、切换配置文件、存储令牌或恢复认证时,才加载其认证参考内容。
当任务依赖用户空间后端、持久性存储、UID 1000 或系统管理的主目录时,加载共享的平台模型。使用
olares-cli files <verb> --help
查看语法说明。

When 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
/Documents/
) lives in
olares-search
; configure which directories get full-text indexing via
settings search dirs
in
olares-settings
.
  • 定位、读取、写入、移动、删除、共享或传输已知的 Olares 文件路径。
  • 压缩/解压文件或管理其异步任务队列。
  • 挂载 SMB/NFS 服务器或管理 Seafile 仓库。
按名称/内容查找文件(以及索引覆盖范围——所有位置的文件名 vs 仅
/Documents/
下的全文检索)功能在
olares-search
中实现;可通过
olares-settings
中的
settings search dirs
配置哪些目录启用全文索引。

Paths and namespace support

路径与命名空间支持

Every resource uses
fileType/extend[/subPath]
. 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]
格式。调用动词前,请确认其命名空间支持情况以及目标是文件还是目录。构建或解析路径时,请查阅路径语法与命名空间规则

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
    files cat
    or
    files download
    ; do not retry the raw resource URL.
  • external/<node>/
    is a virtual volume picker, not a write destination. Writes need
    external/<node>/<volume>/...
    .
  • Eleven reserved names are system-managed at the first level under
    drive/Home/
    .
    rename
    ,
    rm
    , and
    mv
    as a source are refused before any request goes out;
    cp
    and 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.
  • cache/<node>/
    is valid storage but not a concrete dataset for share creation; share
    cache/<node>/<sub>/
    .
  • 目录创建时若重名可能自动重命名,而非返回冲突。上传操作不会预先创建目标目录。若对命名有严格要求,请先检查父目录并手动创建。
  • 直接 GET 文件资源可能返回 HTTP 500。请使用
    files cat
    files download
    ;不要重试原始资源 URL。
  • external/<node>/
    是虚拟卷选择器,而非写入目标。写入需使用
    external/<node>/<volume>/...
    格式。
  • drive/Home/
    下一级有 11 个保留名称由系统管理。
    rename
    rm
    mv
    操作将拒绝以这些名称作为源路径,且该拒绝会列出所有 11 个名称,这是平台固定规则,而非权限错误,无需重试——请操作其子目录即可。名称为精确匹配,仅相似的名称不受保护。
  • cache/<node>/
    是有效的存储位置,但不能作为创建共享的具体数据集;请共享
    cache/<node>/<sub>/

Async task queue (compress / extract)

异步任务队列(压缩/解压)

  • compress
    and
    extract
    enqueue server-side work and return a task id unless waiting.
  • 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.
  • task cancel --all
    affects every task on the node, including work started elsewhere.
  • compress
    extract
    会将工作加入服务器端队列并返回任务 ID(除非等待执行完成)。
  • Ctrl-C 仅停止本地轮询。若用户意图取消任务,请显式取消服务器端任务。
  • 任务按节点划分;请保留任务入队时打印的节点信息。
  • task cancel --all
    会影响该节点上的所有任务,包括其他地方启动的任务。

Version gate (Olares >= 1.12.6)

版本要求(Olares >= 1.12.6)

Archives, NFS, and
drive/Common
require Olares 1.12.6+. Treat daily builds by their
major.minor.patch
base. Follow the shared auth/version gate when the backend version cannot be established.
归档、NFS 以及
drive/Common
功能需要 Olares 1.12.6 及以上版本。每日构建版本按其
major.minor.patch
基础版本处理。当无法确定后端版本时,请遵循共享的认证/版本控制规则。

Verb index

动词索引

VerbRead when triggered
ls
listing and cloud shapes
cat
files cat --help
download
resume, overwrite, directory downloads
upload
collision decisions and cloud transfer
edit
text/size guards and writeback
mkdir
parents, auto-rename, external depth
rm
existence, directory intent, protected paths
rename
in-place rename and protected paths
cp
,
mv
destination and overwrite semantics
chown
UID and namespace decisions
compress
formats, conflicts, passwords, async task
extract
destination, conflicts, passwords, async task
archive
read-only archive inspection
task
per-node cancel/pause/resume
share
internal/public/SMB sharing
smb
discovery, mount, history
nfs
export discovery and mount
repos
files repos --help
动词触发时需查阅的文档
ls
列表与云端形态
cat
files cat --help
download
断点续传、覆盖、目录下载
upload
冲突处理与云端传输
edit
文本/大小限制与回写
mkdir
父目录、自动重命名、外部存储深度
rm
存在性、目录操作意图、受保护路径
rename
原地重命名与受保护路径
cp
,
mv
目标路径与覆盖规则
chown
UID 与命名空间决策
compress
格式、冲突、密码、异步任务
extract
目标路径、冲突、密码、异步任务
archive
只读归档文件检查
task
按节点取消/暂停/恢复
share
内部/公共/SMB 共享
smb
发现、挂载、历史记录
nfs
导出发现与挂载
repos
files repos --help

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
    task cancel --all
    separately because it affects unrelated work on that node.
  • 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
    需单独确认,因为它会影响该节点上的无关任务。
  • 绝不能暴露令牌或密码。尽可能使用基于标准输入的机密输入方式。
  • 当前端路径、节点/卷标识、覆盖意图或并发删除不明确时,停止操作;重新列出父目录并询问用户。