All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Add
PlatformEncoding
andUtf8PlatformEncoding
structs that mirror the functionality ofNativeEncoding
andUtf8NativeEncoding
respectively, but as distinct structs instead of type aliases. - Add
PlatformPath
andPlatformPathBuf
type aliases that usePlatformEncoding
. - Add
Utf8PlatformPath
andUtf8PlatformPathBuf
type aliases that useUtf8PlatformEncoding
.
0.9.3 - 2024-10-15
- Fix
lib.rs
file permissions to not be executable (#33).
0.9.2 - 2024-09-15
- Fix
windows()
function ofTypedPathBuf
andUtf8TypedPathBuf
to properly return an instance ofWindowsPathBuf
andUtf8WindowsPathBuf
respectively. Before this fix, the function instead returned a Unix path wrapper. (#30) - Minimum Rust version of 1.58.1 is now explicitly set via
rust-version
. - Address a variety of internal clippy warnings.
0.9.1 - 2024-07-16
- Add derived
Hash
,PartialOrd
, andOrd
implementations forTypedPath
andTypedPathBuf
enumerations.
0.9.0 - 2024-06-15
- Add
current_exe
andutf8_current_exe
functions to theutils
module to return native pathbufs wrapping the standard library paths. - Add
temp_dir
andutf8_temp_dir
functions to theutils
module to return native pathbufs wrapping the standard library paths.
0.8.0 - 2024-02-24
- Add
push_checked
function, which ensures that any path added to an existingPathBuf
orTypedPathBuf
must abide by the following rules:- It cannot be an absolute path. Only relative paths allowed.
- In the case of Windows, it cannot start with a prefix like
C:
. - All normal components of the path must contain only valid characters.
- If parent directory (..) components are present, they must not result in a path traversal attack (impacting the current path).
- Add
join_checked
function, which ensures that any path joied with an existing path follows the rules ofpush_checked
- Add
with_encoding_checked
function to ensure that the resulting path from an encoding conversion is still valid - Add
with_unix_encoding_checked
andwith_windows_encoding_checked
functions as shortcuts towith_encoding_checked
- Add
is_valid
toComponent
andUtf8Component
traits alongsidePath
andUtf8Path
to indicate if a component/path is valid for the given encoding
0.7.1 - 2024-02-15
- Support
wasm
family for compilation
0.7.0 - 2023-11-04
- Support
no_std
environments, whendefault-features = false
is set for the crate
0.6.0 - 2023-10-12
- Refactor crate exports such that everything other than constants are now
top-level exports
typed_path::unix::UnixComponent
is nowtyped_path::UnixComponent
typed_path::unix::Utf8UnixComponent
is nowtyped_path::Utf8UnixComponent
typed_path::windows::WindowsComponent
is nowtyped_path::WindowsComponent
typed_path::windows::Utf8WindowsComponent
is nowtyped_path::Utf8WindowsComponent
typed_path::windows::WindowsPrefix
is nowtyped_path::WindowsPrefix
typed_path::windows::Utf8WindowsPrefix
is nowtyped_path::Utf8WindowsPrefix
- Constants are now located within the
constants
module, broken out byunix
andwindows
modules to house each set of constants TypedPath
andUtf8TypedPath
now match the method signature ofPath
for constructing self with::new(...)
- Majority of methods available for
Path
andPathBuf
have been ported over toTypedPath
andTypedPathBuf
- Implement
std::fmt::Display
forUtf8UnixComponent
,Utf8WindowsComponent
, andUtf8TypedComponent
0.5.0 - 2023-09-28
- Add
TypedPath
,Utf8TypedPath
,TypedPathBuf
, andUtf8TypedPathBuf
enums to support code that can operate on both Windows and Unix paths
0.4.2 - 2023-09-19
- Add
From<&Utf8NativePath>
forstd::path::PathBuf
0.4.1 - 2023-09-17
- Add
AsRef<std::path::Path>
forUtf8NativePath
andUtf8NativePathBuf
- Add
From<Utf8NativePathBuf>
forstd::path::PathBuf
- Add
rustfmt.toml
to dictate formatting usingcargo +nightly fmt --all
0.4.0 - 2023-08-23
- Add
normalize
method toPath
andUtf8Path
to support resolving.
and..
across Windows and Unix encodings - Add
is_parent
andis_current
methods toComponent
andUtf8Component
traits with implementations for both Unix and Windows component implementations - Add
root
,parent
, andcurrent
static methods toComponent
andUtf8Component
traits to support creating the instances from generics - Add
absolutize
to bothnormalize
the path and - in the case of relative paths - prefix the path with the current working directory - Add
with_encoding
toPath
andUtf8Path
support converting between the Unix and Windows encoding types - Add
utils::current_dir
andutils::utf8_current_dir
to retrieve the current working directory as either aPathBuf
orUtf8PathBuf
- Add
with_unix_encoding
andwith_windows_encoding
toPath
andUtf8Path
support converting between the Unix and Windows encoding types - Add
has_unix_encoding
andhas_windows_encoding
toPath
andUtf8Path
to detect explicit encodings
0.3.2 - 2023-03-27
- Fix implementation of
Display
forUtf8Path
to use underlying strDisplay
instead ofDebug
0.3.1 - 2023-03-14
- Fix joining of empty path with relative path resulting in absolute path when
using
UnixPath::join
orUtf8UnixPath::join
(#6)
0.3.0 - 2023-02-14
- Add
Clone
implementation forBox<Path<T>>
andBox<Utf8Path<T>>
- Fix
Clone
implementation forPathBuf<T>
andUtf8PathBuf<T>
requiring a clone implementation for the encoding, which is not necessary (#5) - Update
Debug
implementation forPath<T>
,Utf8Path<T>
,PathBuf<T>
, andUtf8PathBuf<T>
to no longer require debug implementation for encoding, which is not necessary - Add
label
method to encoding implementations, used for debugging purposes
0.2.1 - 2022-12-12
- Update README with more UTF8 examples and add proper testing of README examples via doctest
0.2.0 - 2022-12-12
- Added UTF-8 variants of
Path
,PathBuf
,Components
,Component
, and other data structures to supportstr
versus[u8]
- Remove requirements of
Clone
,Debug
,Display
, andSized
onEncoding
and subsequent implementationsUnixEncoding
andWindowsEncoding
0.1.0 - 2022-08-24
Initial release of the library!