Generate Root CA
This commit is contained in:
10
central_backend/src/utils/files_utils.rs
Normal file
10
central_backend/src/utils/files_utils.rs
Normal file
@ -0,0 +1,10 @@
|
||||
use std::path::Path;
|
||||
|
||||
/// Create directory if missing
|
||||
pub fn create_directory_if_missing<P: AsRef<Path>>(path: P) -> anyhow::Result<()> {
|
||||
let path = path.as_ref();
|
||||
if !path.exists() {
|
||||
std::fs::create_dir_all(path)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
1
central_backend/src/utils/mod.rs
Normal file
1
central_backend/src/utils/mod.rs
Normal file
@ -0,0 +1 @@
|
||||
pub mod files_utils;
|
Reference in New Issue
Block a user