3 releases (1 stable)
Uses old Rust 2015
1.0.0 | Dec 30, 2017 |
---|---|
0.0.2 | Dec 31, 2016 |
0.0.1 | Dec 30, 2016 |
#1635 in Filesystem
74 downloads per month
5KB
69 lines
mkstemp.rs
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();
}
License
Licensed under MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
lib.rs
:
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();
}
Dependencies
~44KB