INNER CODE UNIT · Rust
get_inode
aannoo/hcom · src/db/mod.rs:90
fn get_inode(path: &std::path::Path) -> u64 {
crate::sys::fs::file_id(path)
}
/// Reject filesystem-backed unit-test databases that are not disposable state.
/// This is a last-resort tripwire for code paths that bypass Config entirely.
///
/// A path is disposable if a fixture registered its root, or if it sits under
/// the system temp tree — the backstop for ad-hoc `tempfile` DBs opened by
/// explicit path. Unlike the Config redirect, this stays lenient about temp
/// geography because tests only ever hand `open_raw` their own throwaway paths;
/// the inherited-real-DB threat flows through Config, which is registry-gated.
#[cfg(test)]
fn assert_isolated_db_path(db_path: &std::path::Path) {
if db_path == std::path::Path::new(":memory:") {
return;
}