TruePath 1.7.0

dotnet add package TruePath --version 1.7.0
                    
NuGet\Install-Package TruePath -Version 1.7.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TruePath" Version="1.7.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TruePath" Version="1.7.0" />
                    
Directory.Packages.props
<PackageReference Include="TruePath" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TruePath --version 1.7.0
                    
#r "nuget: TruePath, 1.7.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=TruePath&version=1.7.0
                    
Install TruePath as a Cake Addin
#tool nuget:?package=TruePath&version=1.7.0
                    
Install TruePath as a Cake Tool

TruePath Status Ventis

This is a library containing a set of types to work with file system paths in .NET.

Motivation

Historically, .NET has been lacking a good set of types to work with file system paths. The System.IO.Path class has a variety of methods that operate on path strings, but it doesn't provide any types to represent paths themselves. It's impossible to tell whether a method accepts an absolute path, a relative path, a file name, or something file-related at all, only looking at its signature: all these types are represented by plain strings. Also, comparing different paths is not straightforward.

This library aims to fill this gap by providing a set of types that represent paths in a strongly-typed way. Now, you can require a path in a method's parameters, and it is guaranteed that the passed path will be well-formed and will have certain properties.

Also, the methods in the library provide some qualities that are missing from the System.IO.Path: say, we aim to provide several ways of path normalization and comparison, the ones that will and will not perform disk IO to resolve paths on case-insensitive file systems.

The library is inspired by the path libraries used in other ecosystems: in particular, Java's java.nio.file.Path and Kotlin's extensions.

Read more on the documentation site.

If you miss some feature or have questions, do not hesitate to open an issue or go to the discussions section.

Packages

Name Badge
TruePath TruePath on nuget.org
TruePath.SystemIo TruePath.SystemIo on nuget.org

TruePath provides two NuGet packages:

Documentation

License

The project is distributed under the terms of the MIT license.

The license indication in the project's sources is compliant with the REUSE specification v3.3.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on TruePath:

Package Downloads
Fenrir.Git

Fenrir is a .NET library to work with Git repositories. It provides functions to read Git objects, traverse the commit graph, extract trees and files from any commit, etc. Essentially, it provides tools to create your own Git client, or transform a repository in any way.

TruePath.SystemIo

Adapters to use System.IO.File and System.IO.Directory APIs together with TruePath.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.7.0 165 3 days ago
1.6.0 3,434 7 months ago
1.5.0 1,005 7 months ago
1.4.0 789 8 months ago
1.3.0 674 10 months ago
1.2.1 161 5/25/2024
1.2.0 237 5/5/2024
1.1.0 273 4/27/2024
1.0.0 161 4/21/2024
0.0.0 131 4/20/2024

[Added]

- A new package, TruePath.SystemIo, with adapter for System.IO types.
TruePath.SystemIo.PathIo contains most of the static methods from .NET's File and Directory types as extension methods over the AbstractPath.
Thanks to @kant2002!