.NET Standard 2.1 .NET Framework 4.5
Install-Package PathLib -Version
dotnet add package PathLib --version
<PackageReference Include="PathLib" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PathLib --version
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PathLib,"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install PathLib as a Cake Addin
#addin nuget:?package=PathLib&version=

// Install PathLib as a Cake Tool
#tool nuget:?package=PathLib&version=
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Paths are commonly used in programming, from opening files to storage directories. They're integral to any program, yet unlike their siblings URLs and URIs very few programming languages (with strong typing) have a strongly typed solution for storing and manipulating paths.

Instead, programmers are forced to store these paths as strings and use a host of static methods to pinch and twist one path into another. In .Net, these are found in the System.IO.Path and System.IO.Directory namespaces. Common operations include combining paths (Path.Combine(path1, path2)) and extracting the filename (Path.GetFileName("C:\file.txt")). Since these are only valid for a particular subset of strings, I'm surprised that more languages do not have objects corresponding to a path so that methods and libraries can accept a "path object" and be confident that the input data conforms to at least a rudimentary set of validation criteria (even if the path itself doesn't exist on disk).

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.1
.NET Framework net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.5

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on PathLib:

Package Downloads

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated 460 4/6/2022
0.9.6 10,779 2/11/2018 1,118 1/7/2015
0.9.5 1,232 12/20/2014 1,058 12/13/2014
0.9.4 1,017 11/30/2014
0.9.3 1,059 11/14/2013
0.9.1 965 11/3/2013
0.9.0 1,268 9/8/2013