Function mkstemp::tempfile [] [src]

pub fn tempfile(template: &str) -> Result<TempFile>

Creates a tempfile given a particular template Templates are specified with a given number of X's.

Examples

use mkstemp::tempfile;
use std::io::Write;

let fh = tempfile("/tmp/tmp.XXXXXXX");
fh.unwrap().file.write("foo".as_bytes());