shithub: mc

ref: 008529cafa91d5f05b4e3db7db8cd165859acc47
dir: /libbio/test/bio-create.myr/

View raw version
use std
use bio

const main = {
	var f

	std.mkdir("tmpout", 0o755);
	match bio.create("tmpout/test-create", bio.Wr, 0o644)
	| `std.Some bio:	f = bio
	| `std.None:	std.fatal(1, "Failed to open file\n")
	;;
	bio.close(f)
}