A função Bun.file() aceita um caminho e retorna uma instância BunFile. Use o método .delete() para eliminar o ficheiro.
ts
const path = "/path/to/file.txt";
const file = Bun.file(path);
await file.delete();Consulte Docs > API > File I/O para documentação completa de Bun.file().