Function symLinkZ [src]
Same as symLink, except the pathname parameters are null-terminated.
Prototype
pub fn symLinkZ( self: Dir, target_path_c: [*:0]const u8, sym_link_path_c: [*:0]const u8, flags: SymLinkFlags, ) !void
Parameters
self: Dir
target_path_c: [*:0]const u8
sym_link_path_c: [*:0]const u8
flags: SymLinkFlags
Source
pub fn symLinkZ(
self: Dir,
target_path_c: [*:0]const u8,
sym_link_path_c: [*:0]const u8,
flags: SymLinkFlags,
) !void {
if (native_os == .windows) {
const target_path_w = try windows.cStrToPrefixedFileW(self.fd, target_path_c);
const sym_link_path_w = try windows.cStrToPrefixedFileW(self.fd, sym_link_path_c);
return self.symLinkW(target_path_w.span(), sym_link_path_w.span(), flags);
}
return posix.symlinkatZ(target_path_c, self.fd, sym_link_path_c);
}