Convert configuration to CDDesc
This commit is contained in:
@@ -134,4 +134,15 @@ pub fn input_to_vec(input: Input) -> Result<Vec<u8>, Error> {
|
||||
}
|
||||
|
||||
Ok(data)
|
||||
}
|
||||
|
||||
pub fn read_file(file_path: PathBuf) -> Result<Vec<u8>, Error> {
|
||||
match std::fs::read(&file_path) {
|
||||
Ok(data) => {
|
||||
Ok(data)
|
||||
},
|
||||
Err(error) => {
|
||||
Err(Error::from_text(format!("Failed reading file {} with error: \"{}\"", file_path.display(), error)))
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user