Skip to documentation
SLOP

tiny.cook.defaultPath

Reference tiny.cook defaultPath

Defined in tiny.cook.

No direct callersNo direct callstiny.cookdefaultPath
Static calls · unresolved targets: 1 · external targets: 1.

Source

Source: lib/cook/src/cache.zig:75

zig
pub fn defaultPath(gpa: Allocator, environ: *const std.process.Environ.Map) ![]u8 {    if (environ.get("TINY_COOK_CACHE")) |path| {        if (!std.fs.path.isAbsolute(path)) return error.CachePathNotAbsolute;        return gpa.dupe(u8, path);    }    if (environ.get("XDG_CACHE_HOME")) |path| {        if (!std.fs.path.isAbsolute(path)) return error.CachePathNotAbsolute;        return std.fs.path.join(gpa, &.{ path, "tiny", "cook" });    }    const home = environ.get("HOME") orelse return error.CacheHomeUnset;    if (!std.fs.path.isAbsolute(home)) return error.CachePathNotAbsolute;    return std.fs.path.join(gpa, &.{ home, ".cache", "tiny", "cook" });}

Source: lib/cook/src/root.zig:10

zig
pub const defaultPath = cache.defaultPath;

Audit

Definitions1
Public names1
Members0
Version26.7.0
Revisiondaab053ee433