Strip the last component from a file path.
If the path is a file in the current directory (no directory component) then returns null.
If the path is the root directory, returns null.
pub fn dirname(path: []const u8) ?[]const u8
pub fn dirname(path: []const u8) ?[]const u8 {
if (native_os == .windows) {
return dirnameWindows(path);
} else {
return dirnamePosix(path);
}
}