NCode.ReparsePoints 1.2.0

Prefix Reserved
dotnet add package NCode.ReparsePoints --version 1.2.0
                    
NuGet\Install-Package NCode.ReparsePoints -Version 1.2.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="NCode.ReparsePoints" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NCode.ReparsePoints" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="NCode.ReparsePoints" />
                    
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 NCode.ReparsePoints --version 1.2.0
                    
#r "nuget: NCode.ReparsePoints, 1.2.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.
#:package NCode.ReparsePoints@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NCode.ReparsePoints&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=NCode.ReparsePoints&version=1.2.0
                    
Install as a Cake Tool

NCode.ReparsePoints

CI Target framework License

Create and inspect Win32 file and folder reparse points such as hard links, junctions (also known as soft links) and symbolic links. The library wraps the Win32 APIs through P/Invoke, so it runs only on Windows, and targets .NET Framework 4.5.1.

Installation

Add the package to a project:

dotnet add package NCode.ReparsePoints

Quick start

using System;
using NCode.ReparsePoints;

internal static class Program
{
    private static void Main()
    {
        var provider = ReparsePointFactory.Provider;
        provider.CreateLink(@"D:\NewJunction", @"C:\SourceDir", LinkType.Junction);

        var link = provider.GetLink(@"D:\NewJunction");
        Console.WriteLine("Type: {0}", link.Type);
        Console.WriteLine("Target: {0}", link.Target);
    }
}

Usage

ReparsePointFactory.Provider returns the default IReparsePointProvider, and ReparsePointFactory.Create() a new one:

Member What it does
LinkType GetLinkType(string path) Says whether the path is a hard link, a junction, a symbolic link or none of them (LinkType.Unknown).
ReparseLink GetLink(string path) Returns the link's Attributes (FileAttributes), Type (LinkType) and Target; the target of a hard link can't be determined, so it is null.
void CreateLink(string path, string target, LinkType type) Creates a hard link, a junction or a symbolic link at path that points to target.

ReparsePointProvider implements the interface, and its CreateHardLink, CreateJunction and CreateSymbolicLink methods are virtual.

Technically speaking a hard link is not a reparse point on Win32 systems: it is a type of file pointer supported since Windows XP and Windows Server 2003.

  • Files only.
  • Must be on the same volume and the same computer.
  • No special privileges required, other than file security.

See Hard Links and Junctions for more information.

Junction

  • Directories only, supported since Windows XP and Windows Server 2003.
  • Resolved by the server, not the client.
  • Can be on a different volume, but must be on the same computer.
  • No special privileges required, other than folder security.

See Hard Links and Junctions for more information.

  • Files or directories, supported since Windows Vista and Windows Server 2008.
  • Resolved by the client, not the server.
  • Can be on a different volume or a different computer.
  • Requires the SeCreateSymbolicLinkPrivilege right: administrator accounts have it by default, but must run elevated, and other accounts must be granted it in Local Security Policy.

See Symbolic Links for more information.

More

The repository holds the source, the issues, the changelog, how to contribute and how to report a vulnerability. NCode.ReparsePoints is licensed under the Apache License 2.0.

Product Compatible and additional computed target framework versions.
.NET Framework net451 is compatible.  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.
  • .NETFramework 4.5.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on NCode.ReparsePoints:

Repository Stars
Chaoses-Ib/ObsidianShell
Associate Markdown files with Obsidian
Version Downloads Last Updated
1.2.0 0 12/1/2026
1.0.2 17,744 7/27/2015
1.0.1 1,872 7/27/2015