| Crates.io | camino-tempfile-ext |
| lib.rs | camino-tempfile-ext |
| version | 0.3.2 |
| created_at | 2025-05-03 23:36:18.857057+00 |
| updated_at | 2025-06-30 02:42:58.855061+00 |
| description | Quality-of-life extensions for camino-tempfile |
| homepage | |
| repository | https://github.com/camino-rs/camino-tempfile |
| max_upload_size | |
| id | 1659225 |
| size | 75,793 |
Quality-of-life extensions for camino-tempfile.
camino-tempfile-ext provides utilities for:
Utf8TempDir.This crate is geared primarily towards testing and development, but it may be of use in production environments as well.
use camino_tempfile_ext::prelude::*;
// Create a temporary directory.
let dir = Utf8TempDir::new().unwrap();
// Create a nested file within this directory. Creation of intermediate
// directories is automatic.
let file = dir.child("foo/bar/baz.txt");
file.write_str("Hello, world!").unwrap();
// Assert on the file's contents (requires the assert feature)
file.assert("Hello, world!");
camino-tempfile-ext’s MSRV is Rust 1.74. At any time, at least the last 6 months of Rust releases will be supported.
Portions of camino-tempfile-ext have been adapted from assert_fs (thank
you to the upstream maintainers!). If you need to work with
std::path::Path rather than camino::Utf8Path, check out
assert_fs.
Upstream code is used under the terms of the MIT and Apache 2.0 licenses.
This project is available under the terms of either the Apache 2.0 license or the MIT license.