pub struct PathResolver { /* private fields */ }Expand description
Builder-style resolver over the ~/.codex/ filesystem.
Implementations§
Source§impl PathResolver
impl PathResolver
pub fn new() -> Self
pub fn with_home<P: Into<PathBuf>>(self, home: P) -> Self
Sourcepub fn with_codex_dir<P: Into<PathBuf>>(self, codex_dir: P) -> Self
pub fn with_codex_dir<P: Into<PathBuf>>(self, codex_dir: P) -> Self
Override the codex directory directly (defaults to ~/.codex).
pub fn home_dir(&self) -> Result<&Path>
pub fn codex_dir(&self) -> Result<PathBuf>
pub fn sessions_root(&self) -> Result<PathBuf>
pub fn history_file(&self) -> Result<PathBuf>
pub fn log_file(&self) -> Result<PathBuf>
pub fn exists(&self) -> bool
Sourcepub fn list_rollout_files(&self) -> Result<Vec<PathBuf>>
pub fn list_rollout_files(&self) -> Result<Vec<PathBuf>>
Enumerate every rollout-*.jsonl file under sessions/, newest
first by file mtime.
Sourcepub fn find_rollout_file(&self, session_id: &str) -> Result<PathBuf>
pub fn find_rollout_file(&self, session_id: &str) -> Result<PathBuf>
Resolve a session identifier to a rollout file path.
Accepts:
- A full filename stem:
rollout-2026-04-20T12-43-30-019dabc6-8fef-7681-a054-b5bb75fcb97d - A bare session UUID (suffix match):
019dabc6-8fef-7681-a054-b5bb75fcb97d - A short UUID prefix:
019dabc6(resolves if unique)
Trait Implementations§
Source§impl Clone for PathResolver
impl Clone for PathResolver
Source§fn clone(&self) -> PathResolver
fn clone(&self) -> PathResolver
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PathResolver
impl Debug for PathResolver
Auto Trait Implementations§
impl Freeze for PathResolver
impl RefUnwindSafe for PathResolver
impl Send for PathResolver
impl Sync for PathResolver
impl Unpin for PathResolver
impl UnsafeUnpin for PathResolver
impl UnwindSafe for PathResolver
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