Quellcodebibliothek
Statistik
Leitseite
products
/
Sources
/
formale Sprachen
/
C
/
LibreOffice
/
svgio
/
qa
/
cppunit
/
data
/ (
Office von Apache
Version 25.8.3.2
©
) Datei vom 5.10.2025 mit Größe 378 B
Bilddatei
any.rs
products/Sources/formale Sprachen/C/Firefox/third_party/rust/tempfile/src/dir/imp/any.rs
use crate::error::IoResultExt; use crate::TempDir; use std::path::PathBuf; use std::{fs, io}; fn not_supported
(msg: &str) -> io::Result
{ Err(io::Error::new(io::ErrorKind::Other, msg)) } pub fn create(path: PathBuf, permissions: Option<&std::fs::Permissions>) -> io::Result
{ if permissions.map_or(false, |p| p.readonly()) { return not_supported("changing permissions is not supported on this platform"); } fs::create_dir(&path) .with_err_path(|| &path) .map(|_| TempDir { path: path.into_boxed_path(), }) }
2026-06-09