Function symLinkAbsoluteZ [src]
Same as symLinkAbsolute except the parameters are null-terminated pointers.
See also symLinkAbsolute.
Prototype
pub fn symLinkAbsoluteZ( target_path_c: [*:0]const u8, sym_link_path_c: [*:0]const u8, flags: Dir.SymLinkFlags, ) !void
Parameters
target_path_c: [*:0]const u8
sym_link_path_c: [*:0]const u8
flags: Dir.SymLinkFlags
Source
pub fn symLinkAbsoluteZ(
target_path_c: [*:0]const u8,
sym_link_path_c: [*:0]const u8,
flags: Dir.SymLinkFlags,
) !void {
assert(path.isAbsoluteZ(target_path_c));
assert(path.isAbsoluteZ(sym_link_path_c));
if (native_os == .windows) {
const target_path_w = try windows.cStrToPrefixedFileW(null, target_path_c);
const sym_link_path_w = try windows.cStrToPrefixedFileW(null, sym_link_path_c);
return windows.CreateSymbolicLink(null, sym_link_path_w.span(), target_path_w.span(), flags.is_directory);
}
return posix.symlinkZ(target_path_c, sym_link_path_c);
}