Provides a TempFile
struct.
std
forbid(unsafe_code)
mkstemp
.tempfile
unsafe
, dependencies full of unsafe
test-temp-file
unsafe
temp_file_name
mktemp
unsafe
rust
let t = temp_file::with_contents(b"abc");
// Prints "/tmp/1a9b0".
println!("{:?}", t.path());
assert_eq!(
"abc",
std::fs::read_to_string(t.path()).unwrap(),
);
// Prints "/tmp/1a9b1".
println!("{:?}", temp_file::empty().path());
```
Metric output format: x/y x = unsafe code used by the build y = total unsafe code found in the crate
Symbols:
🔒 = No unsafe
usage found, declares #![forbid(unsafecode)]
❓ = No unsafe
usage found, missing #![forbid(unsafecode)]
☢️ = unsafe
usage found
Functions Expressions Impls Traits Methods Dependency
0/0 0/0 0/0 0/0 0/0 🔒 temp-file 0.1.6
0/0 0/0 0/0 0/0 0/0
```
std::io::Error
instead of String
.cleanup
.leak
and
panic_on_cleanup_error
.Fixing bugs and adding features is easy and fast. Send us a pull request and we intend to: - Always respond within 24 hours - Provide clear & concrete feedback - Immediately make a new release for your accepted change
License: Apache-2.0