Function mkstemp
fn mkstemp<P: ?Sized + NixPath>(template: &P) -> Result<(OwnedFd, PathBuf)>
Creates a regular file which persists even after process termination
template: a path whose 6 rightmost characters must be X, e.g./tmp/tmpfile_XXXXXX- returns: tuple of file descriptor and filename
Err is returned either if no temporary filename could be created or the template doesn't end with XXXXXX
See also mkstemp(2)
Example
use unistd;
let _ = match mkstemp ;
// do something with fd