Sam Therapy
4f384523a6
All checks were successful
Public Preview Builds / publish-preview (push) Successful in 40s
Signed-off-by: Sam Therapy <sam@samtherapy.net>
485 B
485 B
TL;DR
Add the Xdg.Directories package to your project:
dotnet add package Xdg.Directories
Then use the BaseDirectory
and UserDirectory
classes to access the XDG directories:
using System;
using Xdg.Directories;
// Prints /home/$USER/.local/share
Console.Writeline(BaseDirectory.DataHome);
// Prints /home/$USER/Documents
Console.Writeline(UserDirectory.DocumentsDir);
For more information, see the API documentation.