MCPcopy Create free account
hub / github.com/Moosync/Moosync / get_db_state

Function get_db_state

src-tauri/src/db/mod.rs:83–92  ·  view source on GitHub ↗
(app: &mut App)

Source from the content-addressed store, hash-verified

81
82#[tracing::instrument(level = "debug", skip(app))]
83pub fn get_db_state(app: &mut App) -> Database {
84 let path = app.path().app_data_dir().unwrap().join("songs.db");
85 if let Some(parent) = path.parent() {
86 if !parent.exists() {
87 fs::create_dir_all(parent).unwrap();
88 }
89 }
90
91 Database::new(path)
92}

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected