summaryrefslogtreecommitdiff
path: root/libbio/test/bio-create.myr
blob: 6954e326adf1bee8aa973121e4bfa3dcae7afc16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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)
}