pub fn main(world: World) -> Void raises { let fs: Fs = std.fs.host() let created: Maybe> = std.fs.create(fs, ".zero/readall-input.txt") if created.has { var file: owned = created.value if !std.fs.writeAll(&mut file, std.mem.span("read all ok\n")) { return } } var storage: [64]u8 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] var alloc: FixedBufAlloc = std.mem.fixedBufAlloc(storage) let body: Maybe> = std.fs.readAll(alloc, fs, ".zero/readall-input.txt", 64) if body.has { var buf: owned = body.value let bytes: MutSpan = std.mem.bufBytes(&buf) if std.mem.eqlBytes(bytes, std.mem.span("read all ok\n")) { check world.out.write("fs readAll ok\n") } } }