Xdg.Directories
0.1.1
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
<PackageReference Include="Xdg.Directories" Version="0.1.1" />
paket add Xdg.Directories --version 0.1.1
#r "nuget: Xdg.Directories, 0.1.1"
// Install Xdg.Directories as a Cake Addin #addin nuget:?package=Xdg.Directories&version=0.1.1 // Install Xdg.Directories as a Cake Tool #tool nuget:?package=Xdg.Directories&version=0.1.1
Xdg.Net
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
License
Product | Versions 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. |
.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. |
-
.NETStandard 2.0
- No dependencies.
-
net7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.