Function path [src]

References a file or directory relative to the source root.

Prototype

pub fn path(b: *Build, sub_path: []const u8) LazyPath

Parameters

b: *Buildsub_path: []const u8

Source

pub fn path(b: *Build, sub_path: []const u8) LazyPath { if (fs.path.isAbsolute(sub_path)) { std.debug.panic("sub_path is expected to be relative to the build root, but was this absolute path: '{s}'. It is best avoid absolute paths, but if you must, it is supported by LazyPath.cwd_relative", .{ sub_path, }); } return .{ .src_path = .{ .owner = b, .sub_path = sub_path, } }; }