[][src]Function lox_lang::lox_std::write_file

pub fn write_file(args: &[Value]) -> Result<Value, Box<dyn Error>>

Write a string into a file.

If the file does not already exist, it will be created. If it does exist, its contents will be replaced with the string passed in.

Errors

An Err will be returned if:

  • The specified file is not found.
  • The specified file is not valid UTF-8.