pub struct Paths { /* private fields */ }Expand description
Resolved filesystem paths for config and data directories.
Implementations§
Source§impl Paths
impl Paths
Sourcepub fn resolve() -> Result<Self>
pub fn resolve() -> Result<Self>
Resolve paths from environment variables (pure XDG).
Priority:
LLM_USER_PATH→ flat layout (both dirs point there)$XDG_CONFIG_HOME/llm/$XDG_DATA_HOME/llm$HOME/.config/llm/$HOME/.local/share/llm
Sourcepub fn from_dir(dir: &Path) -> Self
pub fn from_dir(dir: &Path) -> Self
Both dirs point to dir. Used for testing and LLM_USER_PATH override.
pub fn config_dir(&self) -> &Path
pub fn data_dir(&self) -> &Path
pub fn config_file(&self) -> PathBuf
pub fn keys_file(&self) -> PathBuf
pub fn logs_dir(&self) -> PathBuf
pub fn agents_dir(&self) -> PathBuf
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Paths
impl RefUnwindSafe for Paths
impl Send for Paths
impl Sync for Paths
impl Unpin for Paths
impl UnsafeUnpin for Paths
impl UnwindSafe for Paths
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more