Documentation
¶
Overview ¶
Package projectdir resolves project-specific state directories under $XDG_STATE_HOME/sidecar/projects/<slug>/ (defaults to ~/.local/state/sidecar/projects/<slug>/). Each project root gets a unique slug-named directory containing a meta.json that maps back to the original project path.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Resolve ¶
Resolve returns the data directory for the given project root path. It creates the directory (with meta.json) if it does not already exist. On subsequent calls with the same projectRoot, the existing directory is returned.
func ResolveWithBase ¶
ResolveWithBase is the exported, testable form of Resolve. base overrides the state directory (e.g. a temp dir in tests).
func WorktreeDir ¶
WorktreeDir returns the worktree-specific data directory for a project. The directory is created if it does not exist.
func WorktreeDirWithBase ¶
WorktreeDirWithBase is the exported, testable form of WorktreeDir. base overrides the state directory (e.g. a temp dir in tests).
Types ¶
This section is empty.