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

Method invalidate

atomic-repository/src/change_source/token.rs:138–145  ·  view source on GitHub ↗
(&self, source: ChangeSourceKind)

Source from the content-addressed store, hash-verified

136 }
137
138 pub fn invalidate(&self, source: ChangeSourceKind) -> Result<(), TokenStoreError> {
139 let path = self.path(source);
140 match fs::remove_file(&path) {
141 Ok(()) => Ok(()),
142 Err(error) if error.kind() == std::io::ErrorKind::NotFound => Ok(()),
143 Err(source) => Err(TokenStoreError::Io { path, source }),
144 }
145 }
146
147 fn path(&self, source: ChangeSourceKind) -> PathBuf {
148 self.atomic_dir

Callers 1

status_innerMethod · 0.80

Calls 2

pathMethod · 0.45
kindMethod · 0.45

Tested by

no test coverage detected