若要刪除檔案,請使用 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 > FileSystem 以了解更多檔案系統操作。
若要刪除檔案,請使用 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 > FileSystem 以了解更多檔案系統操作。
套件管理器
將 bun install 與 Artifactory 搭配使用
設定 git 以 diff Bun 的 lockb lockfile
在 GitHub Actions 中使用 Bun 安裝依賴套件
讀取檔案
執行環境
串流
將 ReadableStream 轉換為 Uint8Array
將 ReadableStream 轉換為 ArrayBuffer
將 Node.js Readable 轉換為 Uint8Array
工具程式