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

Method sync_dot_dir

atomic-repository/src/repository/mod.rs:778–784  ·  view source on GitHub ↗

Make prior atomic renames/removals in `.atomic` durable before a coupled database transition is allowed to advance. Directory fsync is available on Unix; other supported platforms retain atomic rename semantics but do not expose a portable directory durability barrier.

(&self)

Source from the content-addressed store, hash-verified

776 /// available on Unix; other supported platforms retain atomic rename
777 /// semantics but do not expose a portable directory durability barrier.
778 fn sync_dot_dir(&self) -> Result<(), RepositoryError> {
779 #[cfg(unix)]
780 {
781 std::fs::File::open(&self.dot_dir)?.sync_all()?;
782 }
783 Ok(())
784 }
785
786 /// Get the path where a change file should be stored.
787 ///

Calls

no outgoing calls

Tested by

no test coverage detected