create_temp_file

Function create_temp_file 

Source
pub fn create_temp_file(prefix: &str, content: &str) -> Result<TempPath>
Expand description

Creates a temporary file with content for testing.

§Arguments

  • prefix - The prefix for the temp file name
  • content - The content to write to the file

§Returns

A TempPath that will delete the file when dropped

§Errors

Returns an error if the temp file cannot be created