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

Method remove

atomic-agent/src/integrations/receipt.rs:147–159  ·  view source on GitHub ↗

Delete the receipt file. Returns `true` if one existed.

(agent: &str)

Source from the content-addressed store, hash-verified

145
146 /// Delete the receipt file. Returns `true` if one existed.
147 pub fn remove(agent: &str) -> AgentResult<bool> {
148 let path = receipt_path(agent)?;
149 if path.exists() {
150 std::fs::remove_file(&path)?;
151 // Best-effort cleanup of the per-agent dir if now empty.
152 if let Ok(dir) = agent_dir(agent) {
153 let _ = std::fs::remove_dir(&dir);
154 }
155 Ok(true)
156 } else {
157 Ok(false)
158 }
159 }
160
161 /// Look up the hash we recorded for a destination, if we installed it.
162 pub fn recorded_hash(&self, dst: &Path) -> Option<&str> {

Callers

nothing calls this directly

Calls 3

receipt_pathFunction · 0.85
agent_dirFunction · 0.85
existsMethod · 0.45

Tested by

no test coverage detected