Bun.file()
函數接受路徑並返回 BunFile
實例。使用 .delete()
方法刪除檔案。
const path = "/path/to/file.txt";
const file = Bun.file(path);
await file.delete();
請參閱文件 > API > 檔案 I/O 以取得 Bun.file()
的完整文件。
Bun.file()
函數接受路徑並返回 BunFile
實例。使用 .delete()
方法刪除檔案。
const path = "/path/to/file.txt";
const file = Bun.file(path);
await file.delete();
請參閱文件 > API > 檔案 I/O 以取得 Bun.file()
的完整文件。
套件管理器
將 bun install 與 Artifactory 搭配使用
設定 git 以 diff Bun 的 lockb lockfile
在 GitHub Actions 中使用 Bun 安裝相依性
讀取檔案
執行階段
串流
將 ReadableStream 轉換為 Uint8Array
將 ReadableStream 轉換為 ArrayBuffer
將 Node.js Readable 轉換為 Uint8Array
公用程式