RJCP.IO.Path 0.2.1

dotnet add package RJCP.IO.Path --version 0.2.1
NuGet\Install-Package RJCP.IO.Path -Version 0.2.1
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="RJCP.IO.Path" Version="0.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RJCP.IO.Path --version 0.2.1
#r "nuget: RJCP.IO.Path, 0.2.1"
#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.
// Install RJCP.IO.Path as a Cake Addin
#addin nuget:?package=RJCP.IO.Path&version=0.2.1

// Install RJCP.IO.Path as a Cake Tool
#tool nuget:?package=RJCP.IO.Path&version=0.2.1

RJCP.DLL.Path

This library provides Linux and Windows path manipulation based on strings only. It doesn't rely on the Operating System, so it only attempts to handle high level path features.

1. Features

1.1. Path Strings

The library provides:

  • Operating system agnostic handling. Means that you can write unit tests for Linux path handling, or Windows path handling, and can run your unit tests on all OSes.
  • Normalization of paths in their canonical form. Remove the . or .. from the path automatically. Relative paths remain, and if the path starts off as being pinned (it references the path \) and tries to go beyond this, an exception is raised.
  • On Windows, it understands UNC and DOS style paths.
    • DOS paths on Windows maintain the path per drive letter. So it is still possible to define a relative path, like C:foo.
    • UNC paths are \\server\share, and one can't go up a directory.

.NET Core provides more methods to handle paths. If this satisfies your needs, then there is no need to move over to this library.

  • A path is it's own type Path. This makes it easier to separate from strings.
  • Creating a Path changes depending on the OS, unless explicitly created with WindowsPath or UnixPath.
  • Contains functionality that older versions of .NET doesn't have.
  • Performs additional checks on relative paths when normalizing, to ensure that it remains consistent (i.e. it won't allow going up sufficient parent directories that exceeds the root directory).
1.1.1. Windows

It supports DOS paths (C:\) and UNC paths (\\server\share or \\.\COM10).

1.1.2. Linux

All paths are treated the same, with the root path being /.

1.2. Detailed File System Information

Obtain detailed information about a file (the inode information, volume) via FileSystemNodeInfo. This can allow for comparing of two paths point to the same file, as reported by the file system, regardless if they're symbolic links, or hard links.

1.3. FileExecutable - Information about an Executable File

Supports reading a Windows PE file, or a Linux ELF file, to get information about the executable binary. Get file information with FileExecutable.GetFile().

Newer versions of .NET have functionality to read PE files, but only on Windows. No support for ELF files exist at this time.

2. Release History

2.1. Version 0.2.1

Features:

  • FileSystemNodeInfo: Allow comparison of two paths if they resolve to the same path (DOTNET-852, DOTNET-866, DOTNET-868, DOTNET-897)
  • FileSystemNodeInfo: Recurse on Windows XP (DOTNET-852)
  • FileExecutable (WinExecutable): A mechanism to test if a file is an executable (DOTNET-856, DOTNET-905)
  • UnixElfExecutable: Read an ELF file (DOTNET-857)

Quality:

  • Add README.md reference to NuGet package (DOTNET-818)
  • Kernel32: Make ACCESS_MASK readonly (DOTNET-905)
  • Path: Return concrete types instead of parent types (DOTNET-905)
  • Upgrade from .NET Standard 2.1 to .NET 6.0 (DOTNET-936, DOTNET-937, DOTNET-938, DOTNET-942, DOTNET-945, DOTNET-958, DOTNET-959)

2.2. Version 0.2.0

  • Initial Release
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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. 
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on RJCP.IO.Path:

Package Downloads
RJCP.Core.Environment.Version

Provide extensions for environment version information.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.1 83 3/9/2024
0.2.0 143 6/9/2023