create_new and options functions on File (#69)Error messages now include the original message from std::io::Error by default (#60). Previously this was exposed through the Error::source() method. For example, previously a message would look like:
failed to open file `file.txt`
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
failed to open file `file.txt`: The system cannot find the file specified. (os error 2)
Note that the original error is no longer exposed though Error::source() by default. If you need access to it, you can restore the previous behaviour with the expose_original_error feature flag.
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).
Removed deprecated APIs: File::from_options, tokio::symlink
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.fs_err_try_exists to std::path::Path via extension trait. This feature requires Rust 1.63 or later. (#48)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)From<fs_err::File> for std::fs::File (#38)File::into_parts and File::file_mut to provide more access to the underlying std::fs::File.symlink for unix platformssymlink_file and symlink_dir for windowsFilestd::os::unix::io::{AsRawFd, IntoRawFd}std::os::windows::io::{AsRawHandle, IntoRawHandle}std::os::{unix, windows}::fs::FileExt and implemented them for fs_err::FileOpenOptionsstd::os::{unix, windows}::fs::OpenOptionsExt and implemented them for fs_err::OpenOptionsAsRef<Path> + Into<PathBuf> to either AsRef<Path> or Into<PathBuf>, making the functions more general.canonicalize, hard link, read_link, rename, symlink_metadata and soft_link. (#25)std::path::Path via extension trait (#26)OpenOptions (#27)set_permissions (#28)metadata. (#15)copy. (#7)std::io::Error. (#2)Cargo.toml.Error::cause implementation for fs_err::Error.std::fs::* functions.std::fs::File.