ref: 0b0fb103248ec7b12b3a2b94d88b1fe7a0b4403e
dir: /lib/std/mkpath.myr/
use "syswrap.use" use "errno.use" pkg std = const mkpath : (p : byte[:], mode : int64 -> errno) ;; const mkpath = {p, mode var st for var i = 0; i < p.len; i++ if p[i] == '/' castto(byte) && i != 0 st = mkdir(p[:i], mode) if st != 0 && st != Eexist -> st ;; ;; ;; -> Enone }