Xdg.Directories 0.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Xdg.Directories --version 0.1.1
                    
NuGet\Install-Package Xdg.Directories -Version 0.1.1
                    
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="Xdg.Directories" Version="0.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Xdg.Directories" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Xdg.Directories" />
                    
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 Xdg.Directories --version 0.1.1
                    
#r "nuget: Xdg.Directories, 0.1.1"
                    
#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.
#addin nuget:?package=Xdg.Directories&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Xdg.Directories&version=0.1.1
                    
Install as a Cake Tool

Xdg.Net

Drone build status GitHub Actions Build GitHub Actions CodeQL Nuget

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.

Default Locations

If any of the respective XDG environment are specified, the variable will always be returned. Otherwise, the value depends on the operating system.

Inspiration is taken from the Go implementation for Windows and MacOS directories.

<details open> <summary>Base Directory</summary>

| Environment Variable | Windows | macOS | Linux/FreeBSD | | --- | --- | --- | --- | | XDG_DATA_HOME | %LOCALAPPDATA% | $HOME/Library/Application Support | $HOME/.local/share | | XDG_CONFIG_HOME | %LOCALAPPDATA% | $HOME/Library/Application Support | $HOME/.config | | XDG_STATE_HOME | %LOCALAPPDATA% | $HOME/Library/Application Support | $HOME/.local/state | | XDG_BIN_HOME | null | null | $HOME/.local/bin | | XDG_DATA_DIRS | %APPDATA%:%PROGRAMDATA% | /Library/Application Support | /usr/local/share:/usr/share | | XDG_CONFIG_DIRS | %LOCALAPPDATA% | $HOME/Library/Preferences:/Library/Application Support:/Library/Preferences | /etc/xdg | | XDG_CACHE_HOME | %LOCALAPPDATA% | $HOME/Library/Application Support | $HOME/.config | | XDG_RUNTIME_HOME | %LOCALAPPDATA% | $HOME/Library/Application Support | /run/user/$UID | </details>

<details open> <summary>User Directory</summary>

User directories on Windows use Known Folders. | Environment Variable | Windows | macOS | Linux/FreeBSD | | --- | --- | --- | --- | | XDG_DESKTOP_DIR | Desktop | $HOME/Desktop | $HOME/Desktop | | XDG_DOWNLOAD_DIR | null | $HOME/Downloads | $HOME/Downloads | | XDG_DOCUMENTS_DIR | My Documents | $HOME/Documents | $HOME/Documents | | XDG_MUSIC_DIR | My Music | $HOME/Music | $HOME/Music | | XDG_PICTURES_DIRS | My Pictures | $HOME/Pictures | $HOME/Pictures | | XDG_VIDEOS_DIR | My Videos | $HOME/Movies | $HOME/Videos | | XDG_TEMPLATES_DIR | Templates | $HOME/Templates | $HOME/Templates | | XDG_PUBLICSHARE_DIR | %PUBLIC% | $HOME/Public | $HOME/Public | </details>

<details open> <summary>Extra Directories</summary>

| | Windows | macOS | Linux/FreeBSD | | --- | --- | --- | --- | | Home | %USERPROFILE% | $HOME | $HOME | </details>

Packaging

Stable releases are available on NuGet, and preview releases are uploaded to both GitHub packages (need GitHub account to download) and Gitea packages (no login required).

dotnet add package Xdg.Directories

Native Library

View the README here

License

MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.
  • net7.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Xdg.Directories:

Package Downloads
CrossDesktop.Common

Shared abstractions and types used in CrossDesktop.* packages, as well as the basic primitives required for parsing common XDG types including localestring and entry files.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Xdg.Directories:

Repository Stars
BrycensRanch/SnapX
SnapX is a free, open-source, cross-platform tool that lets you capture or record any area of your screen and instantly share it with a single keypress. Upload images, videos, text, and more to multiple supported destinations—all with ease. ShareX fork
Version Downloads Last Updated
0.1.2 13,430 3/27/2024
0.1.1 251 10/25/2023