Function temp_file::with_contents[][src]

#[must_use]pub fn with_contents(contents: &[u8]) -> TempFile

Create a new file in a system temporary directory and writes contents to it.

Panics if it fails to create the file or fails to write all of contents.