Skip to content

Conversation

@enricozb
Copy link
Contributor

@enricozb enricozb commented Jan 20, 2026

adds the File type and basic functions open and .read_bytes. Example usage looks like:

use #root::IO::File;

pub fn main(&io: &IO) {
  let file = File::open(&io, "Cargo.toml").assume();
  let bytes = file.read_bytes().assume();
  let content = String(bytes.map(fn*(b: N32) { b as Char }));

  io.println("{content}");

  file.close(&io);
}

Base automatically changed from enricozb/ext-tuple to dev January 27, 2026 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants