Expand description
bun.sys.File — high-level file handle. Port of src/sys/File.zig.
Owns the descriptor; closes it on Drop (skipping Fd::INVALID and stdio
so File::stdin()/stdout()/stderr() and default-constructed handles
are safe to drop). Use File::into_raw to hand the fd off,
File::borrow for a non-owning &File view of someone else’s fd.
All methods preserve OS errno via crate::Maybe.
Structs§
- File
- Read
ToEnd Result - Port of
bun.sys.File.ReadToEndResult—{ bytes, err? }pair so callers can recover the partially-read buffer even on error (Zig returns the buffer regardless and tags.err).