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

Method sync_dot_dir

atomic-repository/src/repository/mod.rs:1417–1423  ·  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

1415 /// available on Unix; other supported platforms retain atomic rename
1416 /// semantics but do not expose a portable directory durability barrier.
1417 fn sync_dot_dir(&self) -> Result<(), RepositoryError> {
1418 #[cfg(unix)]
1419 {
1420 std::fs::File::open(&self.dot_dir)?.sync_all()?;
1421 }
1422 Ok(())
1423 }
1424
1425 /// Get the path where a change file should be stored.
1426 ///

Calls 1

openFunction · 0.85

Tested by

no test coverage detected