wng-lib 0.1.3

The W package manager library | WNG is a C package and projects manager written in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::path::Path;
use std::{fs, fs::File};

pub fn reinit(path: Option<&str>) -> crate::Result<()> {
    let config_file = crate::get_config_file(path);

    if Path::new(&config_file).exists() {
        fs::remove_file(&config_file)?;
    }

    File::create(&config_file)?;

    Ok(())
}