feature. See also
. The project being documented here (as the example) is the Zig library itself.
Maker.installSymLinksInner
fn installSymLinksInner(
maker: *Maker,
arena: Allocator,
output_path: Path,
asking_step_index: Configuration.Step.Index,
filename_major_only: []const u8,
filename_name_only: []const u8,
) !void
File
Code
fn installSymLinksInner(
maker: *Maker,
arena: Allocator,
output_path: Path,
asking_step_index: Configuration.Step.Index,
filename_major_only: []const u8,
filename_name_only: []const u8,
) !void {
const io = maker.graph.io;
const step = stepByIndex(maker, asking_step_index);
const out_basename = Io.Dir.path.basename(output_path.sub_path);
const out_dir = output_path.dirname().?;
const major_only_path = try out_dir.join(arena, filename_major_only);
const name_only_path = try out_dir.join(arena, filename_name_only);
major_only_path.root_dir.handle.symLinkAtomic(io, out_basename, major_only_path.sub_path, .{}) catch |err|
return step.fail(maker, "failed symlinking {f} to {s}: {t}", .{ output_path, out_basename, err });
name_only_path.root_dir.handle.symLinkAtomic(io, filename_major_only, name_only_path.sub_path, .{}) catch |err|
return step.fail(maker, "failed symlinking {f} to {s}: {t}", .{ name_only_path, filename_major_only, err });
}