Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Read text files with Bun
Bun.file()
const file = Bun.file("data.txt"); const text = await file.text(); console.log(text);
import { readFileSync } from "node:fs"; const text = readFileSync("data.txt", "utf-8"); console.log(text);
try { const file = Bun.file("data.txt"); const text = await file.text(); console.log(text); } catch (error) { console.error("Failed to read file:", error); }