write_string

Function write_string 

Source
pub fn write_string<P: AsRef<Path>, S: AsRef<str>>(
    path: P,
    contents: S,
) -> CoreResult<()>
Expand description

Writes a string to a file

§Arguments

  • path - Path to the file
  • contents - String to write

§Returns

  • Ok(()) if the file was written successfully
  • Err(CoreError::IoError) if the file could not be written