MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / find_session_files

Function find_session_files

src/accounting/parser.rs:19–31  ·  view source on GitHub ↗

Find all JSONL session files under `~/.claude/projects/`.

()

Source from the content-addressed store, hash-verified

17
18/// Find all JSONL session files under `~/.claude/projects/`.
19fn find_session_files() -> Vec<PathBuf> {
20 let Some(home) = dirs::home_dir() else {
21 return Vec::new();
22 };
23 let projects_dir = home.join(".claude").join("projects");
24 if !projects_dir.is_dir() {
25 return Vec::new();
26 }
27
28 let mut files = Vec::new();
29 collect_jsonl_files(&projects_dir, &mut files, 0);
30 files
31}
32
33/// Recursively collect .jsonl files, with a depth limit to avoid runaway traversal.
34fn collect_jsonl_files(dir: &Path, out: &mut Vec<PathBuf>, depth: u8) {

Callers 1

ingestFunction · 0.85

Calls 2

collect_jsonl_filesFunction · 0.85
home_dirFunction · 0.50

Tested by

no test coverage detected