Skip to main content

write_text_file

Function write_text_file 

Source
pub fn write_text_file<P: AsRef<Path>>(path: P, content: &str) -> Result<()>
Expand description

Writes text to a file with proper error handling.

§Arguments

  • path - Path to the file to write.
  • content - Text content to write.

§Returns

  • A Result<(), io::Error> indicating success or failure.