fn dirnameInner(comptime path_type: PathType, path: []const u8) ?[]const u8
fn dirnameInner(comptime path_type: PathType, path: []const u8) ?[]const u8 { var it = ComponentIterator(path_type, u8).init(path); _ = it.last() orelse return null; const up = it.previous() orelse return it.root(); return up.path; }