要删除文件,请使用 Bun.file(path).delete()
。
// Delete a file
const file = Bun.file("path/to/file.txt");
await file.delete();
// Now the file doesn't exist
const exists = await file.exists();
// => false
有关更多文件系统操作,请参阅 文档 > API > 文件系统。
要删除文件,请使用 Bun.file(path).delete()
。
// Delete a file
const file = Bun.file("path/to/file.txt");
await file.delete();
// Now the file doesn't exist
const exists = await file.exists();
// => false
有关更多文件系统操作,请参阅 文档 > API > 文件系统。
HTTP
包管理器
将 bun install 与 Artifactory 一起使用
配置 Git 以 diff Bun 的 lockb lockfile
读取文件
运行时
流
将 ReadableStream 转换为 Uint8Array
将 ReadableStream 转换为 ArrayBuffer
将 Node.js Readable 转换为 Uint8Array
实用程序