| Crates.io | temp-file |
| lib.rs | temp-file |
| version | 0.1.9 |
| created_at | 2021-03-18 23:09:19.655914+00 |
| updated_at | 2024-10-03 07:52:01.129575+00 |
| description | Simple temporary file with cleanup |
| homepage | |
| repository | https://gitlab.com/leonhard-llc/ops |
| max_upload_size | |
| id | 370797 |
| size | 27,879 |
Provides a TempFile struct.
stdforbid(unsafe_code)mkstemp.tempfile
unsafe, dependencies full of unsafetest-temp-file
unsafetemp_file_name
mktemp
unsafelet 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(unsafe_code)]
❓ = No `unsafe` usage found, missing #![forbid(unsafe_code)]
☢️ = `unsafe` usage found
Functions Expressions Impls Traits Methods Dependency
0/0 0/0 0/0 0/0 0/0 🔒 temp-file 0.1.9
0/0 0/0 0/0 0/0 0/0
AsRef<Path>in_dir, with_suffix, and TempFileBuilder.std::io::Error instead of String.cleanup.leak
and
panic_on_cleanup_error.License: Apache-2.0