@embedFile

@embedFile

@embedFile(comptime path: []const u8) *const [X:0]u8

This function returns a compile time constant pointer to null-terminated, fixed-size array with length equal to the byte count of the file given by path. The contents of the array are the contents of the file. This is equivalent to a string literal with the file contents.

path is absolute or relative to the current file, just like @import.

See also:

  • @import