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