Frank.SymbolicLinkHelper
1.0.0
See the version list below for details.
dotnet add package Frank.SymbolicLinkHelper --version 1.0.0
NuGet\Install-Package Frank.SymbolicLinkHelper -Version 1.0.0
<PackageReference Include="Frank.SymbolicLinkHelper" Version="1.0.0" />
paket add Frank.SymbolicLinkHelper --version 1.0.0
#r "nuget: Frank.SymbolicLinkHelper, 1.0.0"
// Install Frank.SymbolicLinkHelper as a Cake Addin #addin nuget:?package=Frank.SymbolicLinkHelper&version=1.0.0 // Install Frank.SymbolicLinkHelper as a Cake Tool #tool nuget:?package=Frank.SymbolicLinkHelper&version=1.0.0
Frank.SymbolicLinkHelper
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 | Versions 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. |
-
net8.0
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 | 94 | 5/20/2024 |
1.0.0 | 93 | 5/20/2024 |
0.1.3-preview | 84 | 5/20/2024 |