pub fn dirname(path: []const u8) ?[]const u8 path: []const u81319
1320
1321
1322
1323
1324
1325pub fn dirname(path: []const u8) ?[]const u8 {
if (native_os == .windows) {
return dirnameWindows(path);
} else {
return dirnamePosix(path);
}
}
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.