parent
bc4315762c
commit
5abbf991d9
@ -1,17 +0,0 @@
|
||||
use std::fs::copy;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use crate::error::*;
|
||||
|
||||
pub fn copy_file(src: &PathBuf, dst: &PathBuf) -> MkrootResult<()> {
|
||||
if let Err(e) = copy(&src, &dst) {
|
||||
return Err(MkrootError::from(format!(
|
||||
"Error copying file from {} to {}: {}",
|
||||
&src.display(),
|
||||
&dst.display(),
|
||||
e
|
||||
)));
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
use std::fs::create_dir;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use crate::error::*;
|
||||
|
||||
pub fn mkdir(dir: &PathBuf) -> MkrootResult<()> {
|
||||
if let Err(e) = create_dir(&dir) {
|
||||
return Err(MkrootError::from(format!(
|
||||
"Error creating directory {}: {}",
|
||||
&dir.display(),
|
||||
e
|
||||
)));
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
mod copy_file;
|
||||
mod mkdir;
|
||||
mod perms;
|
||||
|
||||
pub use crate::util::copy_file::copy_file;
|
||||
pub use crate::util::mkdir::mkdir;
|
||||
pub use crate::util::perms::*;
|
Loading…
Reference in new issue