Vendor dependencies

This commit is contained in:
2026-08-01 16:11:49 +03:00
parent 7f139a0241
commit 6b5e7f0f8b
29706 changed files with 9575646 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
use crate::error::IoResultExt;
use crate::TempDir;
use std::io;
use std::path::PathBuf;
pub fn create(
path: PathBuf,
permissions: Option<&std::fs::Permissions>,
disable_cleanup: bool,
) -> io::Result<TempDir> {
let mut dir_options = std::fs::DirBuilder::new();
#[cfg(not(target_os = "wasi"))]
{
use std::os::unix::fs::{DirBuilderExt, PermissionsExt};
if let Some(p) = permissions {
dir_options.mode(p.mode());
}
}
dir_options
.create(&path)
.with_err_path(|| &path)
.map(|_| TempDir {
path: path.into_boxed_path(),
disable_cleanup,
})
}