Releases: chipsenkbeil/typed-path
Releases · chipsenkbeil/typed-path
typed-path 0.8.0
Notable Changes
- 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
typed-path 0.7.1
Notable Changes
- Support
wasm
family for compilation
typed-path 0.7.0
Notable Changes
- Support
no_std
environments, whendefault-features = false
is set for the crate
typed-path v0.6.0
Notable Changes
- Refactor crate exports such that everything other than constants are now
top-level exportstyped_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
- Implement
PartialEq<&str>
and reverse forUtf8TypedPath
andUtf8TypedPathBuf
typed-path 0.5.0
Notable changes
- Add
TypedPath
,Utf8TypedPath
,TypedPathBuf
, andUtf8TypedPathBuf
enums to support code that can operate on both Windows and Unix paths
typed-path 0.4.2
Notable Changes
- Add
From<&Utf8NativePath>
forstd::path::PathBuf
typed-path 0.4.1
Notable Changes
- Add
AsRef<std::path::Path>
forUtf8NativePath
andUtf8NativePathBuf
- Add
From<Utf8NativePathBuf>
forstd::path::PathBuf
- Add
rustfmt.toml
to dictate formatting usingcargo +nightly fmt --all
typed-path 0.4.0
Notable Changes
- 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
typed-path v0.3.2
Notable Changes
- Fix implementation of
Display
forUtf8Path
to use underlying strDisplay
instead ofDebug
typed-path 0.3.1
Notable Changes
- Fix joining of empty path with relative path resulting in absolute path when using
UnixPath::join
orUtf8UnixPath::join
(#6)