{"id":57107,"library":"tempfile","title":"tempfile","description":"A library for managing temporary files and directories.","status":"active","version":"3.27.0","language":"rust","source_language":null,"source_url":"https://github.com/Stebalien/tempfile","tags":["temporary","file","directory","testing"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\ntempfile = \"3.27.0\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add tempfile","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"TempDir","correct":"use tempfile::TempDir;"}],"quickstart":{"code":"use tempfile::TempDir;\nuse std::fs::File;\nuse std::io::Write;\n\nfn main() -> std::io::Result<()> {\n    let dir = TempDir::new()?;\n    let file_path = dir.path().join(\"test.txt\");\n    let mut file = File::create(&file_path)?;\n    writeln!(file, \"Hello, world!\")?;\n    println!(\"Created temp file: {:?}\", file_path);\n    Ok(())\n}","lang":"rust","description":"Creates a temporary directory and writes a file inside it."},"warnings":[],"env_vars":null,"search_vec":"'directori':9,12 'file':7,11 'librari':3 'manag':5 'tempfil':1 'temporari':6,10 'test':13","created_at":"2026-06-16T15:28:25.941314+00:00","updated_at":"2026-06-16T15:28:25.941314+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://stebalien.com/projects/tempfile-rs/","github":"https://github.com/Stebalien/tempfile","docs":"https://docs.rs/tempfile/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility","testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}