• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# fs-err Changelog
2
3## 3.1.0
4
5* Added new wrappers for `create_new` and `options` functions on `File` ([#69](https://github.com/andrewhickman/fs-err/pull/69))
6
7## 3.0.0
8
9* Error messages now include the original message from `std::io::Error` by default ([#60](https://github.com/andrewhickman/fs-err/pull/60)). Previously this was exposed through the [`Error::source()`](https://doc.rust-lang.org/stable/std/error/trait.Error.html#method.source) method. For example, previously a message would look like:
10
11  ```
12  failed to open file `file.txt`
13  ```
14
15  and you would have to remember to print the source, or use a library like `anyhow` to print the full chain of source errors. The new error message includes the cause by default
16
17  ```
18  failed to open file `file.txt`: The system cannot find the file specified. (os error 2)
19  ```
20
21  Note that the original error is no longer exposed though [`Error::source()`](https://doc.rust-lang.org/stable/std/error/trait.Error.html#method.source) by default. If you need access to it, you can restore the previous behaviour with the `expose_original_error` feature flag.
22
23* The `io_safety` feature flag has been removed, and this functionality is now always enabled on Rust versions which support it (1.63.0 and greater).
24
25* Removed deprecated APIs: `File::from_options`, `tokio::symlink`
26
27## 2.11.0
28
29* Added the first line of the standard library documentation to each function's rustdocs, to make them more useful in IDEs ([#50](https://github.com/andrewhickman/fs-err/issues/45))
30* Fixed the wrapper for `tokio::fs::symlink_dir()` on Windows being incorrectly named `symlink`. The old function is now deprecated and will be removed in the next breaking release.
31
32## 2.10.0
33
34* Add `fs_err_try_exists` to `std::path::Path` via extension trait. This feature requires Rust 1.63 or later. ([#48](https://github.com/andrewhickman/fs-err/pull/48))
35
36## 2.9.0
37
38* Add wrappers for [`tokio::fs`](https://docs.rs/tokio/latest/tokio/fs/index.html) ([#40](https://github.com/andrewhickman/fs-err/pull/40)).
39
40## 2.8.1
41
42* Fixed docs.rs build
43
44## 2.8.0
45
46* Implement I/O safety traits (`AsFd`/`AsHandle`, `Into<OwnedFd>`/`Into<OwnedHandle>`) for file. This feature requires Rust 1.63 or later and is gated behind the `io_safety` feature flag. ([#39](https://github.com/andrewhickman/fs-err/pull/39))
47
48## 2.7.0
49
50* Implement `From<fs_err::File> for std::fs::File` ([#38](https://github.com/andrewhickman/fs-err/pull/38))
51
52## 2.6.0
53
54* Added [`File::into_parts`](https://docs.rs/fs-err/2.6.0/fs_err/struct.File.html#method.into_parts) and [`File::file_mut`](https://docs.rs/fs-err/2.6.0/fs_err/struct.File.html#method.file_mut) to provide more access to the underlying `std::fs::File`.
55* Fixed some typos in documention ([#33](https://github.com/andrewhickman/fs-err/pull/33))
56
57## 2.5.0
58* Added `symlink` for unix platforms
59* Added `symlink_file` and `symlink_dir` for windows
60* Implemented os-specific extension traits for `File`
61  - `std::os::unix::io::{AsRawFd, IntoRawFd}`
62  - `std::os::windows::io::{AsRawHandle, IntoRawHandle}`
63  - Added trait wrappers for `std::os::{unix, windows}::fs::FileExt` and implemented them for `fs_err::File`
64* Implemented os-specific extension traits for `OpenOptions`
65  - Added trait wrappers for `std::os::{unix, windows}::fs::OpenOptionsExt` and implemented them for `fs_err::OpenOptions`
66* Improved compile times by converting arguments early and forwarding only a small number of types internally. There will be a slight performance hit only in the error case.
67* Reduced trait bounds on generics from `AsRef<Path> + Into<PathBuf>` to either `AsRef<Path>` or `Into<PathBuf>`, making the functions more general.
68
69## 2.4.0
70* Added `canonicalize`, `hard link`, `read_link`, `rename`, `symlink_metadata` and `soft_link`. ([#25](https://github.com/andrewhickman/fs-err/pull/25))
71* Added aliases to `std::path::Path` via extension trait ([#26](https://github.com/andrewhickman/fs-err/pull/26))
72* Added `OpenOptions` ([#27](https://github.com/andrewhickman/fs-err/pull/27))
73* Added `set_permissions` ([#28](https://github.com/andrewhickman/fs-err/pull/28))
74
75## 2.3.0
76* Added `create_dir` and `create_dir_all`. ([#19](https://github.com/andrewhickman/fs-err/pull/19))
77* Added `remove_file`, `remove_dir`, and `remove_dir_all`. ([#16](https://github.com/andrewhickman/fs-err/pull/16))
78
79## 2.2.0
80* Added `metadata`. ([#15](https://github.com/andrewhickman/fs-err/pull/15))
81
82## 2.1.0
83* Updated crate-level documentation. ([#8](https://github.com/andrewhickman/fs-err/pull/8))
84* Added `read_dir`, `ReadDir`, and `DirEntry`. ([#9](https://github.com/andrewhickman/fs-err/pull/9))
85
86## 2.0.1 (2020-02-22)
87* Added `copy`. ([#7](https://github.com/andrewhickman/fs-err/pull/7))
88
89## 2.0.0 (2020-02-19)
90* Removed custom error type in favor of `std::io::Error`. ([#2](https://github.com/andrewhickman/fs-err/pull/2))
91
92## 1.0.1 (2020-02-15)
93* Fixed bad documentation link in `Cargo.toml`.
94
95## 1.0.0 (2020-02-15)
96* No changes from 0.1.2.
97
98## 0.1.2 (2020-02-10)
99* Added `Error::cause` implementation for `fs_err::Error`.
100
101## 0.1.1 (2020-02-05)
102* Added wrappers for `std::fs::*` functions.
103
104## 0.1.0 (2020-02-02)
105* Initial release, containing a wrapper around `std::fs::File`.
106