Function addBytesToSource [src]

A path relative to the package root. Be careful with this because it updates source files. This should not be used as part of the normal build process, but as a utility occasionally run by a developer with intent to modify source files and then commit those changes to version control.

Prototype

pub fn addBytesToSource(usf: *UpdateSourceFiles, bytes: []const u8, sub_path: []const u8) void

Parameters

usf: *UpdateSourceFilesbytes: []const u8sub_path: []const u8

Source

pub fn addBytesToSource(usf: *UpdateSourceFiles, bytes: []const u8, sub_path: []const u8) void { const b = usf.step.owner; usf.output_source_files.append(b.allocator, .{ .contents = .{ .bytes = bytes }, .sub_path = sub_path, }) catch @panic("OOM"); }