save/restore custom app groups
This commit is contained in:
parent
04b4b88534
commit
ce3bcd7821
8 changed files with 156 additions and 25 deletions
11
examples/app_library/utils.rs
Normal file
11
examples/app_library/utils.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
use std::path::PathBuf;
|
||||
|
||||
use gtk4::glib;
|
||||
|
||||
pub fn data_path() -> PathBuf {
|
||||
let mut path = glib::user_data_dir();
|
||||
path.push("com.cosmic.app_library");
|
||||
std::fs::create_dir_all(&path).expect("Could not create directory.");
|
||||
path.push("data.json");
|
||||
path
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue