use anyhow::{Context, Result};
pub fn get_file_content(file_path: &std::path::Path) -> Result<String> {
std::fs::read_to_string(file_path)
.with_context(|| format!("could not read file `{}`", file_path.display()))
}
pub fn write_to_file(
source_location: String,
new_file: String,
) -> std::result::Result<(), anyhow::Error> {
std::fs::write(&source_location, new_file)
.with_context(|| format!("could not write to file `{}`", source_location))
}