Skip to content

Commit e14a371

Browse files
committed
Add support for async closing of files and dirs
Provides some initial work for #1, even though it still does not support asynchronous drops.
1 parent 1f325af commit e14a371

File tree

6 files changed

+1125
-546
lines changed

6 files changed

+1125
-546
lines changed

CHANGELOG.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,19 @@
33
All notable changes to this project will be documented in this file.
44
This project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

6+
## Unreleased
7+
8+
### Added
9+
10+
- Added `TempDir` for automatically deleted temporary directories.
11+
- Added `close` methods to `TempFile` and `TempDir` allow for manual file system interactions.
12+
- Added `AsyncClose` trait for manual closing / deletion of `AsyncFile` and `AsyncDir` instances.
13+
This is gated behind the `async-trait` crate feature and disabled by default.
14+
615
## [0.5.0] - 2023-12-06
716

17+
[0.5.0]: https://github.com/sunsided/async-tempfile-rs/releases/tag/0.5.0
18+
819
### Changed
920

1021
- The `new` and `new_in` functions now do not rely on the `uuid` feature anymore
@@ -17,6 +28,8 @@ This project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1728

1829
## [0.4.0] - 2023-06-16
1930

31+
[0.4.0]: https://github.com/sunsided/async-tempfile-rs/releases/tag/0.4.0
32+
2033
### Added
2134

2235
- Added `uuid` as a default crate feature and feature gated all `uuid` crate related functionality.
@@ -44,6 +57,3 @@ This project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4457
### Internal
4558

4659
- 🎉 Initial release.
47-
48-
[0.5.0]: https://github.com/sunsided/async-tempfile-rs/releases/tag/0.5.0
49-
[0.4.0]: https://github.com/sunsided/async-tempfile-rs/releases/tag/0.4.0

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ edition = "2021"
1414
[features]
1515
default = []
1616
uuid = ["dep:uuid"]
17+
async-trait = ["dep:async-trait"]
1718

1819
[[test]]
1920
name = "tests"
2021
path = "tests/tests.rs"
2122

2223
[dependencies]
24+
async-trait = { version = "0.1.77", optional = true }
2325
tokio = { version = "1.36.0", features = ["fs"] }
2426
uuid = { version = "1.7.0", features = ["v4"], optional = true }
2527

0 commit comments

Comments
 (0)