要刪除檔案,請使用 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
實用程式