From 2f1f3a3ed5b8c1d9d0e6fd7365decbb05e704cc3 Mon Sep 17 00:00:00 2001 From: Friedrich von Never Date: Fri, 21 Jun 2024 00:04:57 +0200 Subject: [PATCH] (#43) Document the changes --- CHANGELOG.md | 2 ++ README.md | 8 ++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 646e842..5603049 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] (1.3.0) ### Added +- `IPath::IsPrefixOf` to check path prefixes. +- `IPath::StartsWith` to check if the current path starts with a specified path. - [#38: Introduce `AbsolutePath::CurrentWorkingDirectory`](https://github.com/ForNeVeR/TruePath/issues/38). ### Changed diff --git a/README.md b/README.md index 07746d2..ccc3d66 100644 --- a/README.md +++ b/README.md @@ -76,8 +76,9 @@ Aside from the strict types, the following features are supported for the paths: - `IPath::FileName` returns the last component of the path; - `IPath::Parent` returns the parent path item (`null` for the root path or top-level relative path); - `IPath` supports operators to join it with `LocalPath` or a `string` (note that in both cases appending an absolute path to path of another kind will take over: the last absolute path in chain will win and destroy all the previous ones; this is the standard behavior of path-combining methods — use `AbsolutePath` in combination with `RelativePath` if you want to avoid this behavior); +- `IPath::IsPrefixOf` to check path prefixes; +- `IPath::StartsWith` to check if the current path starts with a specified path; - `LocalPath::IsAbsolute` to check the path kind (since it supports both kinds); -- `LocalPath::IsPrefixOf` to check path prefixes; - `LocalPath::RelativeTo` to get a relative part between two paths, if possible; - extension methods on `IPath`: - `GetExtensionWithDot` and `GetExtensionWithoutDot` to get the file extension with or without the leading dot (note that `GetExtensionWithDot` will behave differently for paths ending with dots and paths without dot at all); @@ -85,11 +86,6 @@ Aside from the strict types, the following features are supported for the paths: (Note how `GetFileNameWithoutExtension()` works nicely together with `GetExtensionWithDot()` to reconstruct the resulting path from their concatenation, however weird the initial name was — no extension, trailing dot, no base name.) -### Unreleased - -- `IPath::IsPrefixOf` to check path prefixes. -- `IPath::StartsWith` to check if the current path starts with a specified path. - Documentation ------------- - [Contributor Guide][docs.contributing]