Xdg.Directories (0.1.3-preview.0.12)

Published 2024-10-10 13:55:46 +00:00 by sam in mirrors/Xdg.Directories

Installation

dotnet nuget add source --name mirrors --username your_username --password your_token 
dotnet add package --source mirrors --version 0.1.3-preview.0.12 Xdg.Directories

About this package

.NET implementation of the XDG Base Directory Specification and user directories

Xdg.Directories

A .NET Standard library for the XDG Base Directory Specification and XDG user directories.

GitHub Actions Workflow Status NuGet Version Documentation MIT License

Xdg.Directories is a small (the .dll is only 11 KB), fast and portable (Completely supports .NET Standard 2.0 and even NativeAOT!) .NET implementation of the XDG Base Directory Specification and XDG user directories for Windows, MacOS and Linux/FreeBSD.

Full documentation can be found at https://xdg-net.github.io/Xdg.Directories.

Installation

Use NuGet to install Xdg.Directories.

From the .NET CLI:

dotnet add package Xdg.Directories

or from Visual Studio's package manager:

Install-Package Xdg.Directories

Pre-releases

Preview releases are uploaded to both GitHub packages (need GitHub account to download) and Forgejo packages (no login required).

Usage

Base Directories, C#

using System;
using Xdg.Directories;

// Prints /home/$USER/.local/share
Console.Writeline(BaseDirectory.DataHome);

// Prints /home/$USER/.cache
Console.Writeline(BaseDirectory.CacheHome)

User Directories, F#

open Xdg.Directories

// Prints /home/$USER/Documents
printfn "%s" UserDirectory.DesktopDir

License

This project is licensed under the MIT license.
Icon is made by Emoji One, CC BY-SA 4.0, via Wikimedia Commons an image.

Dependencies

ID Version Target Framework
Microsoft.NET.ILLink.Tasks 8.0.10 .NETStandard2.0
Microsoft.NET.ILLink.Tasks 8.0.10 net8.0
Details
NuGet
2024-10-10 13:55:46 +00:00
0
Xdg.Directories Authors
38 KiB
Assets (2)
Versions (15) View all
0.1.3-preview.0.12 2024-10-10
0.1.3-preview.0.11 2024-10-10
0.1.3-preview.0.7 2024-07-07
0.1.3-preview.0.6 2024-04-10
0.1.3-preview.0.4 2024-04-06