Something went wrong. Try again.
馃尡 A minimal programming language and compiler. git.urbach.dev/cli/q
high-performance programming-language compiler
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031import cimport iowriteFile(path string, buffer string) -> error { cpath := c.string(path) fd, err := openWrite(cpath.ptr) delete(cpath) if err != 0 { return err } pos := 0 loop { assert pos < buffer.len n, err := io.writeTo(fd, buffer[pos..]) if err != 0 { close(fd) return err } pos += n if pos == buffer.len { close(fd) return 0 } }}