npx skills add https://github.com/anomalyco/opencode --skill bun-file-iopackages/opencode 中的文件 I/O 或扫描操作时Bun.file(path) 是惰性的;调用 text、json、stream、arrayBuffer、bytes、exists 来读取。file.size、、。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
file.typefile.nameBun.write(dest, input) 可写入字符串、缓冲区、Blobs、Responses 或文件。Bun.file(...).delete() 删除文件。file.writer() 返回一个用于增量写入的 FileSink。Bun.Glob + Array.fromAsync(glob.scan({ cwd, absolute, onlyFiles, dot })) 用于扫描。Bun.which 查找二进制文件,然后使用 Bun.spawn 运行它。Bun.readableStreamToText/Bytes/JSON 处理流输出。mkdir、readdir、递归操作)使用 node:fs/promises。fs。Bun.file(...).exists()。arrayBuffer() 并通过 file.type 进行 MIME 检查。Bun.Glob + Array.fromAsync 进行扫描。Bun.readableStreamToText 解码工具的标准错误输出。Bun.write(Bun.file(path), text)。注意:如果值是目录,Bun.file(...).exists() 将返回 false。如果路径可能是文件或目录,请改用 Filesystem.exists(...)。
path.join/path.resolve。.catch(...) 而非 try/catch。每周安装量
105
代码仓库
GitHub 星标数
111.4K
首次出现
2026年1月22日
安全审计
安装于
opencode92
claude-code65
gemini-cli64
codex62
github-copilot57
antigravity47
packages/opencodeBun.file(path) is lazy; call text, json, stream, arrayBuffer, bytes, exists to read.file.size, file.type, file.name.Bun.write(dest, input) writes strings, buffers, Blobs, Responses, or files.Bun.file(...).delete() deletes a file.file.writer() returns a FileSink for incremental writes.Bun.Glob + Array.fromAsync(glob.scan({ cwd, absolute, onlyFiles, dot })) for scans.Bun.which to find a binary, then Bun.spawn to run it.Bun.readableStreamToText/Bytes/JSON for stream output.node:fs/promises for directories (mkdir, readdir, recursive operations).fs for file access.Bun.file(...).exists() before reading.arrayBuffer() and MIME checks via file.type.Bun.Glob + Array.fromAsync for scans.Bun.readableStreamToText.Bun.write(Bun.file(path), text).NOTE: Bun.file(...).exists() will return false if the value is a directory. Use Filesystem.exists(...) instead if path can be file or directory
path.join/path.resolve for paths..catch(...) over try/catch when possible.Weekly Installs
105
Repository
GitHub Stars
111.4K
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode92
claude-code65
gemini-cli64
codex62
github-copilot57
antigravity47
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
43,100 周安装
Gemini API 开发指南:谷歌最新 AI 模型接入、SDK 安装与快速上手教程
8,800 周安装
Jest 测试框架最佳实践指南:JavaScript/TypeScript 单元测试与 React 组件测试
8,800 周安装
Playwright 网站探索测试工具 - 自动识别核心功能并生成测试用例
8,900 周安装
GitHub Issues 管理工具 - MCP 服务器与 CLI 集成,高效处理 Bug、Feature、Task
9,000 周安装
Flutter 专家指南:使用 Flutter 3 与 Riverpod/Bloc 构建高性能跨平台应用
9,100 周安装
2024 .NET 后端开发模式指南:构建生产级API、MCP服务器与企业应用
9,100 周安装