//! Filesystem helpers shared by persistence components.
pubmodstore_lock;pubusestore_lock::StoreLockGuard;usecrate::error::StoreResult;usestd::path::Path;/// Sync directory entries to disk to guarantee metadata durability.
pubfnsync_directory(path:&Path)->StoreResult<()>{// Opening directories is platform-dependent. `std::fs::File::open` works on Linux
// and macOS as long as the path exists.
let dir =std::fs::File::open(path)?;
dir.sync_all()?;Ok(())}