ezinstall 0.1.0

`ezinstall` provides a simple installer which can verify and install compatible tarballs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::{ error::Result, packagedir::Packagedir };
use std::fs;


/// Forcibly deletes a cached archive
pub fn exec<T>(name: T) -> Result where T: AsRef<str> {
    // Get the path to the cached archive
    let packagedir = Packagedir::new()?;
    let path = packagedir.join(name.as_ref());

    // Delete the file
    fs::remove_file(path)?;
    Ok(())
}