Function resolve [src]
On Windows, this calls resolveWindows and on POSIX it calls resolvePosix.
Prototype
pub fn resolve(allocator: Allocator, paths: []const []const u8) ![]u8 Parameters
allocator: Allocatorpaths: []const []const u8 Example
test resolve {
try testResolveWindows(&[_][]const u8{ "a\\b\\c\\", "..\\..\\.." }, ".");
try testResolveWindows(&[_][]const u8{"."}, ".");
try testResolveWindows(&[_][]const u8{""}, ".");
try testResolvePosix(&[_][]const u8{ "a/b/c/", "../../.." }, ".");
try testResolvePosix(&[_][]const u8{"."}, ".");
try testResolvePosix(&[_][]const u8{""}, ".");
} Source
pub fn resolve(allocator: Allocator, paths: []const []const u8) ![]u8 {
if (native_os == .windows) {
return resolveWindows(allocator, paths);
} else {
return resolvePosix(allocator, paths);
}
}