@filebox/runtime
v1.0.0
Published
Node-only workspace runtime and file operations for FileBox
Readme
@filebox/runtime
FileBox 的 Node.js 运行时包,负责工作区配置、驱动加载、挂载管理、上传下载和文件操作。
安装
pnpm add @filebox/runtime使用
import { FileBoxRuntime } from "@filebox/runtime";
const runtime = await FileBoxRuntime.create({
configPath: "./data/filebox.json",
});
const drives = await runtime.drives.list();
const files = await runtime.listPath(drives[0].name, "/");常用入口:
FileBoxRuntime.create(options):创建运行时实例。runtime.drives:管理驱动连接。runtime.fs:执行目录创建、重命名、复制、移动和删除。runtime.transfer:处理上传和下载配置。runtime.index:建立和查询文件索引。
License
MIT
