{"id":16162355,"url":"https://github.com/sunsided/async-tempfile-rs","last_synced_at":"2025-03-16T10:30:35.329Z","repository":{"id":61839127,"uuid":"555608426","full_name":"sunsided/async-tempfile-rs","owner":"sunsided","description":"Automatically deleted async I/O temporary files in Rust","archived":false,"fork":false,"pushed_at":"2025-02-22T06:36:18.000Z","size":126,"stargazers_count":9,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-01T12:19:55.513Z","etag":null,"topics":["async-io","rust","temporary-files","tokio"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/async-tempfile","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sunsided.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2022-10-21T23:30:43.000Z","updated_at":"2025-02-22T06:36:21.000Z","dependencies_parsed_at":"2023-12-06T18:44:01.502Z","dependency_job_id":"636f8b63-b828-43ca-b383-b296ba13c647","html_url":"https://github.com/sunsided/async-tempfile-rs","commit_stats":{"total_commits":24,"total_committers":1,"mean_commits":24.0,"dds":0.0,"last_synced_commit":"d3e34ec2651bd95416ad2c3aaba50864cedff67f"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Fasync-tempfile-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Fasync-tempfile-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Fasync-tempfile-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunsided%2Fasync-tempfile-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunsided","download_url":"https://codeload.github.com/sunsided/async-tempfile-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243809888,"owners_count":20351407,"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":["async-io","rust","temporary-files","tokio"],"created_at":"2024-10-10T02:29:51.853Z","updated_at":"2025-03-16T10:30:35.041Z","avatar_url":"https://github.com/sunsided.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# async-tempfile\n\n[![Crates.io](https://img.shields.io/crates/v/async-tempfile)](https://crates.io/crates/async-tempfile)\n[![Crates.io](https://img.shields.io/crates/l/async-tempfile)](https://crates.io/crates/async-tempfile)\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/sunsided/async-tempfile-rs/rust.yml)\n[![docs.rs](https://img.shields.io/docsrs/async-tempfile)](https://docs.rs/async-tempfile/)\n[![codecov](https://codecov.io/gh/sunsided/async-tempfile-rs/graph/badge.svg?token=LSY85I6M8Y)](https://codecov.io/gh/sunsided/async-tempfile-rs)\n\nProvides the `TempFile` struct, an asynchronous wrapper based on `tokio::fs`\nfor temporary files that will be automatically deleted when the last reference to\nthe struct is dropped.\n\n```rust\nuse async_tempfile::TempFile;\n\n#[tokio::main]\nasync fn main() {\n    let parent = TempFile::new().await.unwrap();\n\n    // The cloned reference will not delete the file when dropped.\n    {\n        let nested = parent.open_rw().await.unwrap();\n        assert_eq!(nested.file_path(), parent.file_path());\n        assert!(nested.file_path().is_file());\n    }\n\n    // The file still exists; it will be deleted when `parent` is dropped.\n    assert!(parent.file_path().is_file());\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunsided%2Fasync-tempfile-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunsided%2Fasync-tempfile-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunsided%2Fasync-tempfile-rs/lists"}