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

Method flush

atomic-core/src/output/memory.rs:211–225  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

209 }
210
211 fn flush(&mut self) -> io::Result<()> {
212 // Flush writes the content to the in-memory storage
213 let files = unsafe { &*self.files };
214 let contents = self.buffer.get_ref().clone();
215 files.borrow_mut().insert(
216 self.path.clone(),
217 MemoryFile {
218 contents,
219 metadata: FileMetadata::file(),
220 modified: SystemTime::now(),
221 inode: self.inode,
222 },
223 );
224 Ok(())
225 }
226}
227
228impl Drop for MemoryWriter {

Callers 3

get_messageMethod · 0.45
runMethod · 0.45
dropMethod · 0.45

Calls 2

cloneMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected