Lines Matching +full:fs +full:- +full:extra
1 <!--
2 This readme is created with https://github.com/livioribeiro/cargo-readme
5 -->
7 # fs-err
9 [](https://crates.io/crates/fs-err)
10 …Actions](https://github.com/andrewhickman/fs-err/workflows/CI/badge.svg)](https://github.com/andre…
12 fs-err is a drop-in replacement for [`std::fs`][std::fs] that provides more
13 helpful messages on errors. Extra information includes which operations was
18 Using [`std::fs`][std::fs], if this code fails:
30 ...but if we use fs-err instead, our error contains more actionable information:
39 fs-err's API is the same as [`std::fs`][std::fs], so migrating code to use it is easy.
42 // use std::fs;
43 use fs_err as fs;
45 let contents = fs::read_to_string("foo.txt")?;
51 fs-err uses [`std::io::Error`][std::io::Error] for all errors. This helps fs-err
59 let file = File::open("my-config.json")?;
69 [std::fs]: https://doc.rust-lang.org/stable/std/fs/
70 [std::io::Error]: https://doc.rust-lang.org/stable/std/io/struct.Error.html
71 [std::io::Read]: https://doc.rust-lang.org/stable/std/io/trait.Read.html
86 * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses…
87 * MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.org/licenses/MIT)
94 submitted for inclusion in the work by you, as defined in the Apache-2.0