MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / same_dir

Function same_dir

atomic-agent/src/transcript/opencode.rs:161–168  ·  view source on GitHub ↗

Compare two directories, canonicalizing when possible.

(a: &Path, b: &Path)

Source from the content-addressed store, hash-verified

159
160/// Compare two directories, canonicalizing when possible.
161fn same_dir(a: &Path, b: &Path) -> bool {
162 let ca = std::fs::canonicalize(a);
163 let cb = std::fs::canonicalize(b);
164 match (ca, cb) {
165 (Ok(ca), Ok(cb)) => ca == cb,
166 _ => a == b,
167 }
168}
169
170/// Messages of the session in chronological order: `(id, role)`.
171fn read_messages(conn: &Connection, session_id: &str) -> Option<Vec<(String, String)>> {

Callers 1

read_turnFunction · 0.85

Calls 1

canonicalizeFunction · 0.50

Tested by

no test coverage detected