parent
a172f4c645
commit
977bf2f147
@ -0,0 +1,17 @@
|
|||||||
|
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,3 +1,5 @@
|
|||||||
|
mod copy_file;
|
||||||
mod perms;
|
mod perms;
|
||||||
|
|
||||||
|
pub use crate::util::copy_file::copy_file;
|
||||||
pub use crate::util::perms::*;
|
pub use crate::util::perms::*;
|
||||||
|
Loading…
Reference in new issue