parent
05d4580faa
commit
fc9b5bc77e
@ -0,0 +1,16 @@
|
|||||||
|
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,5 +1,7 @@
|
|||||||
mod copy_file;
|
mod copy_file;
|
||||||
|
mod mkdir;
|
||||||
mod perms;
|
mod perms;
|
||||||
|
|
||||||
pub use crate::util::copy_file::copy_file;
|
pub use crate::util::copy_file::copy_file;
|
||||||
|
pub use crate::util::mkdir::mkdir;
|
||||||
pub use crate::util::perms::*;
|
pub use crate::util::perms::*;
|
||||||
|
Loading…
Reference in new issue