bungibindies/bun/bunfile
A BunFile represents a lazily-loaded file; initializing it does not actually read the file from disk.
Note from Bun — The
Bun.fileandBun.writeAPIs documented on this page are heavily optimized and represent the recommended way to perform file-system tasks using Bun. For operations that are not yet available withBun.file, such asmkdirorreaddir, you can use Bun’s nearly complete implementation of thenode:fsmodule.
Types
Values
pub fn delete(file: BunFile) -> Promise(Nil)
pub fn json(file: BunFile) -> Promise(Dynamic)
pub fn text(file: BunFile) -> Promise(String)
pub const unlink: fn(BunFile) -> Promise(Nil)