save/restore custom app groups

This commit is contained in:
Ashley Wulber 2021-12-06 10:56:45 -05:00 committed by Jeremy Soller
parent 04b4b88534
commit ce3bcd7821
8 changed files with 156 additions and 25 deletions

View 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
}