pub fn write_file<P>(path: P, content: String) -> Result<(), Error>
Expand description
Writes the given content to a file at the given path.
§Arguments
path
- APathBuf
or string slice containing the path to the file to be written.content
- AString
containing the content to be written to the file.
§Return
A Result
containing a unit value if the file is written successfully, or an
std::io::Error
otherwise.