Frank.SymbolicLinkHelper 1.0.4-preview

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

// Install Frank.SymbolicLinkHelper as a Cake Tool
#tool nuget:?package=Frank.SymbolicLinkHelper&version=1.0.4-preview&prerelease                

Frank.SymbolicLinkHelper

GitHub License NuGet NuGet

This is a helper library for creating symbolic links in .NET. It is a wrapper around the Windows API function CreateSymbolicLink or the Linux/Unix equivalent symlink function. It uses dependency injection to allow for swapping the implementation of the helper implementation. This allows for platform specific implementations to be used in a cross-platform and user-friendly way.

This does not do any error handling, it is up to the caller to handle any exceptions that may be thrown such as access/permission errors due to the file system protections or user permissions.

Installation

This library is available on NuGet. You can install it using the following command:

dotnet add package Frank.SymbolicLinkHelper

Usage

To use this library, you need to add the following code to your Startup.cs file:

services.AddSymbolicLinkHelper();

Then you can inject the ISymbolicLinkHelper interface into your classes and use it to create symbolic links:

public class MyService
{
    private readonly ISymbolicLinkHelper _symbolicLinkHelper;

    public MyService(ISymbolicLinkHelper symbolicLinkHelper)
    {
        _symbolicLinkHelper = symbolicLinkHelper;
    }

    public void CreateSymbolicLink(string source, string target)
    {
        _symbolicLinkHelper.CreateSymbolicLink(new File/DirectoryInfo(source), new File/DirectoryInfo(target));
    }
}

License

This library is licensed under the MIT License. See the LICENSE file for more information.

Contributing

Contributions are welcome! Please read the CONTRIBUTING.md file for more information.

Code of Conduct

Please read the CODE_OF_CONDUCT.md file for more information.

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.4-preview 88 5/20/2024
1.0.0 90 5/20/2024
0.1.3-preview 79 5/20/2024