tiny.cook.defaultPath
Defined in tiny.cook.
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
| Definitions | 1 |
|---|---|
| Public names | 1 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |