pub fn write_to_file(content: &str, path: &Path) -> Result<()>Expand description
Writes string content to a file.
Creates the file if it doesn’t exist, or overwrites it if it does. Parent directories are not created automatically.
§Arguments
content- The string content to writepath- The file path to write to
§Returns
Returns Ok(()) on success.
§Errors
Returns an error if the file cannot be created or written to.