Function with_contents

Source
pub fn with_contents(contents: &[u8]) -> TempFile
Expand description

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

ยงPanics

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