{"id":13439450,"url":"https://github.com/Stebalien/tempfile","last_synced_at":"2025-03-20T08:31:04.037Z","repository":{"id":30280830,"uuid":"33832372","full_name":"Stebalien/tempfile","owner":"Stebalien","description":"Temporary file library for rust","archived":false,"fork":false,"pushed_at":"2024-10-23T22:01:50.000Z","size":443,"stargazers_count":1165,"open_issues_count":11,"forks_count":115,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-25T03:13:04.407Z","etag":null,"topics":["filesystem-library","library","rust","tempfile","testing"],"latest_commit_sha":null,"homepage":"http://stebalien.com/projects/tempfile-rs","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Stebalien.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-12T20:21:14.000Z","updated_at":"2024-10-23T22:01:55.000Z","dependencies_parsed_at":"2023-02-10T19:01:00.365Z","dependency_job_id":"dbd5d89a-b5ff-41d6-b7fc-d46a7a9a3781","html_url":"https://github.com/Stebalien/tempfile","commit_stats":{"total_commits":335,"total_committers":68,"mean_commits":4.926470588235294,"dds":0.3820895522388059,"last_synced_commit":"a354f8cb118004cb0c4c6b6aa6bb351e6c191b96"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stebalien%2Ftempfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stebalien%2Ftempfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stebalien%2Ftempfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stebalien%2Ftempfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stebalien","download_url":"https://codeload.github.com/Stebalien/tempfile/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221411216,"owners_count":16815614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filesystem-library","library","rust","tempfile","testing"],"created_at":"2024-07-31T03:01:14.021Z","updated_at":"2024-10-27T22:30:57.635Z","avatar_url":"https://github.com/Stebalien.png","language":"Rust","funding_links":[],"categories":["Libraries","Rust","库 Libraries","虚拟化","库"],"sub_categories":["Filesystem","文件系统 Filesystem","文件系统"],"readme":"tempfile\n========\n\n[![Crate](https://img.shields.io/crates/v/tempfile.svg)](https://crates.io/crates/tempfile)\n[![Build Status](https://github.com/Stebalien/tempfile/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/Stebalien/tempfile/actions/workflows/ci.yml?query=branch%3Amaster)\n\nA secure, cross-platform, temporary file library for Rust. In addition to creating\ntemporary files, this library also allows users to securely open multiple\nindependent references to the same temporary file (useful for consumer/producer\npatterns and surprisingly difficult to implement securely).\n\n[Documentation](https://docs.rs/tempfile/)\n\nUsage\n-----\n\nMinimum required Rust version: 1.63.0\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\ntempfile = \"3\"\n```\n\nExample\n-------\n\n```rust\nuse std::fs::File;\nuse std::io::{Write, Read, Seek, SeekFrom};\n\nfn main() {\n    // Write\n    let mut tmpfile: File = tempfile::tempfile().unwrap();\n    write!(tmpfile, \"Hello World!\").unwrap();\n\n    // Seek to start\n    tmpfile.seek(SeekFrom::Start(0)).unwrap();\n\n    // Read\n    let mut buf = String::new();\n    tmpfile.read_to_string(\u0026mut buf).unwrap();\n    assert_eq!(\"Hello World!\", buf);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStebalien%2Ftempfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStebalien%2Ftempfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStebalien%2Ftempfile/lists"}