Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

serveLibFile

WebServer.serveLibFile
fn serveLibFile(
    ws: *WebServer,
    request: *http.Server.Request,
    sub_path: []const u8,
    content_type: []const u8,
) !void

File

lib/compiler/Maker/WebServer.zig:518

Code

fn serveLibFile(
    ws: *WebServer,
    request: *http.Server.Request,
    sub_path: []const u8,
    content_type: []const u8,
) !void {
    const graph = ws.graph;

    return serveFile(ws, request, .{
        .root_dir = graph.zig_lib_directory,
        .sub_path = sub_path,
    }, content_type);
}