mirror of https://github.com/zkat/cacache-rs.git
feat(rm): added content/rm
This commit is contained in:
parent
837e90b484
commit
eac29d941b
|
|
@ -1,3 +1,4 @@
|
|||
pub mod path;
|
||||
pub mod read;
|
||||
pub mod write;
|
||||
pub mod rm;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
use crate::content::path;
|
||||
use ssri::Integrity;
|
||||
use std::io;
|
||||
use std::fs;
|
||||
use std::path::Path;
|
||||
|
||||
pub fn rm(cache: &Path, sri: &Integrity) -> io::Result<()> {
|
||||
fs::remove_file(path::content_path(&cache, &sri))
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
mod content;
|
||||
pub use crate::content::path;
|
||||
pub use crate::content::read;
|
||||
pub use crate::content::rm;
|
||||
pub use crate::content::write;
|
||||
|
|
|
|||
Loading…
Reference in New Issue