Crates.io | mkstemp-rs |
lib.rs | mkstemp-rs |
version | 1.0.0 |
source | src |
created_at | 2016-12-30 12:59:12.08277 |
updated_at | 2017-12-30 11:07:02.410862 |
description | Safe wrapper over mkstemp function from libc |
homepage | |
repository | https://github.com/dremon/mkstemp.rs |
max_upload_size | |
id | 7857 |
size | 5,767 |
Safe wrapper over mkstemp function from libc
Usage example:
use std::io::Write;
extern crate mkstemp;
pub fn main() {
// delete automatically when it goes out of scope
let mut temp_file = mkstemp::TempFile::new("/tmp/testXXXXXX", true).unwrap();
temp_file.write("test content".as_bytes()).unwrap();
}
Licensed under MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)