Function put_text

Source
pub fn put_text<P: AsRef<Path>, S: AsRef<str>>(path: P, data: S) -> Result<()>
Expand description

Creates a file at the given path with given text contents, encoded as UTF-8. Overwrites, non-atomically, if the file exists. The path can be a string or a Path.