paths

package
v0.19.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package paths resolves on-disk locations for Cog's per-user caches.

Callers SHOULD route every cache lookup through this package so a single environment variable (COG_CACHE_DIR) can relocate all of Cog's caches in one step — useful when the default cache directory lives on a different filesystem than the user's project tree and hardlinking would fail with EXDEV.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WeightsStoreDir

func WeightsStoreDir() (string, error)

WeightsStoreDir returns the directory that backs the local content-addressed weight file store.

Resolution order:

  1. $COG_CACHE_DIR/weights, if COG_CACHE_DIR is set.
  2. $XDG_CACHE_HOME/cog/weights, if set.
  3. $HOME/.cache/cog/weights otherwise — on every platform.

Note the deliberate deviation from os.UserCacheDir, which returns $HOME/Library/Caches on macOS. Dev tooling conventionally lives under ~/.cache or ~/.<toolname>, not ~/Library, so we follow suit.

WeightsStoreDir does not create the directory; callers that need it to exist should MkdirAll it themselves (FileStore does).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL