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

#1459 in Filesystem

Download history 34/week @ 2024-04-11 20/week @ 2024-04-18 51/week @ 2024-04-25 41/week @ 2024-05-02 29/week @ 2024-05-09 27/week @ 2024-05-16 26/week @ 2024-05-23 28/week @ 2024-05-30 12/week @ 2024-06-06 22/week @ 2024-06-13 18/week @ 2024-06-20 8/week @ 2024-06-27 57/week @ 2024-07-04 11/week @ 2024-07-11 28/week @ 2024-07-18 40/week @ 2024-07-25

137 downloads per month

MIT license

5KB
69 lines

mkstemp.rs

Safe wrapper over mkstemp function from libc

Documentation

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

~43KB