mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
plugin ins/outs
This commit is contained in:
parent
da1d3220f9
commit
9351887ae6
9 changed files with 187 additions and 64 deletions
|
|
@ -1,6 +1,7 @@
|
|||
use crate::prelude::*;
|
||||
|
||||
const CONFIG_FILE_NAME: &'static str = "dawdle.toml";
|
||||
const CONFIG_FILE_NAME: &'static str = "tek.toml";
|
||||
const PROJECT_FILE_NAME: &'static str = "project.toml";
|
||||
|
||||
pub fn create_dirs (xdg: µxdg::XdgApp) -> Result<(), Box<dyn Error>> {
|
||||
use std::{path::Path,fs::{File,create_dir_all}};
|
||||
|
|
@ -19,5 +20,10 @@ pub fn create_dirs (xdg: µxdg::XdgApp) -> Result<(), Box<dyn Error>> {
|
|||
println!("Creating {data_dir:?}");
|
||||
create_dir_all(&data_dir)?;
|
||||
}
|
||||
let project_path = data_dir.join(PROJECT_FILE_NAME);
|
||||
if !Path::new(&project_path).exists() {
|
||||
println!("Creating {project_path:?}");
|
||||
File::create_new(&project_path)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue