summaryrefslogtreecommitdiff
path: root/lib/bio/test/bio-create.myr
blob: 7015f6aceb5767a2824cbfc259316984d707700a (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.Ok bio:	f = bio
	| `std.Err m:	std.fatal("Failed to open file: {}\n", m)
	;;
	bio.close(f)
}