crates.io version license: Apache 2.0 unsafe forbidden pipeline status

temp-dir

Provides a TempDir struct.

Features

Limitations

Alternatives

Related Crates

Example

rust use temp_dir::TempDir; let d = TempDir::new().unwrap(); // Prints "/tmp/t1a9b0". println!("{:?}", d.path()); let f = d.child("file1"); // Prints "/tmp/t1a9b0/file1". println!("{:?}", f); std::fs::write(&f, b"abc").unwrap(); assert_eq!( "abc", std::fs::read_to_string(&f).unwrap(), ); // Prints "/tmp/t1a9b1". println!( "{:?}", TempDir::new().unwrap().path());

Cargo Geiger Safety Report

```

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-dir 0.1.2

0/0 0/0 0/0 0/0 0/0

```