This library aims to provide ergonomic path and file operations to rust with reasonable performance.
The stdlib Path
, PathBuf
and File
objects have non-helpful error messages
(they don't mention the path where an error is from!) and don't tell you
anything about the type the path was or whether the path even exists. It is
also next to impossible to compare paths(does one have a symlink? What is the
current workind directory? Etc).
The pathabs crate aims to make working with paths and files ergonomic, so that you can (in general) be protected from errors by the _types of your path/file.
From the type you can tell:
PathFile
or PathDir
)PathFile.append_str("something")
or PathDir.list()
.FileRead
can only read, FileWrite
can only write
and FileEdit
can do both. These types are guaranteed by their
constructors to be able to accomplish their method and trait implemenations,
and they give better errors too!See the library docs for more information
The source code in this repository is Licensed under either of - Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) - MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.