changxi 0.3.0

TUI EPUB Reader
1
2
3
4
5
6
7
8
9
10
use std::fs;
use std::path::PathBuf;

pub fn get_profile_path(name: &str) -> PathBuf {
    let mut path = dirs::config_dir().unwrap_or_else(|| PathBuf::from("."));
    path.push("changxi");
    path.push(name);
    let _ = fs::create_dir_all(&path);
    path
}