Documentation
¶
Overview ¶
Package paths provides centralized path resolution for Plural's data directories.
Plural supports the XDG Base Directory Specification for organizing files:
- Config (XDG_CONFIG_HOME): config.json — user settings worth syncing
- Data (XDG_DATA_HOME): sessions/*.json — local session history
- State (XDG_STATE_HOME): logs/ — transient log files
Resolution order:
- If ~/.plural/ exists → use legacy flat layout (all paths under ~/.plural/)
- If XDG env vars are set → use XDG layout with proper separation
- Fresh install, no XDG vars → default to ~/.plural/
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigFilePath ¶
ConfigFilePath returns the full path to config.json.
func IsLegacyLayout ¶
func IsLegacyLayout() bool
IsLegacyLayout returns true if using the ~/.plural/ flat layout.
func Reset ¶
func Reset()
Reset clears the cached path resolution. This is intended for testing only.
func SessionsDir ¶
SessionsDir returns the directory for session message files.
func WorktreesDir ¶
WorktreesDir returns the directory for centralized git worktrees.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.