Learn more about Mintlify
Enter your email to receive updates about new features and product releases.
Write files with Bun
Bun.write()
await Bun.write("output.txt", "Hello World");
const data = { name: "John", age: 30 }; await Bun.write("data.json", JSON.stringify(data, null, 2));
const file = Bun.file("log.txt"); await Bun.write(file, "New log entry\n", { append: true });