Skip to main content

db_path_for

Function db_path_for 

Source
pub fn db_path_for(drive_root: &Path) -> PathBuf
Expand description

Returns the SQLite database file path for a drive root.

Use this when a background task needs to open its own connection to the same database — e.g. duplicate / burst detection runs in spawn_blocking and shouldn’t compete with the shared Arc<Mutex<Database>> for a lock. SQLite WAL handles the concurrent reader/writer.