42 lines
No EOL
13 KiB
JSON
42 lines
No EOL
13 KiB
JSON
{
|
|
"api/Xdg.Directories.BaseDirectory.html": {
|
|
"href": "api/Xdg.Directories.BaseDirectory.html",
|
|
"title": "Class BaseDirectory",
|
|
"keywords": "Class BaseDirectory Namespace Xdg.Directories Assembly Xdg.Directories.dll The XDG Base Directory specification is a standard created by freedesktop.org that standardizes the location of storing application files. public static class BaseDirectory Inheritance object BaseDirectory Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Remarks This allows users to have less clutter in their home directories, and allows programmers to not have to hard-code directories. For all base directories, the directories are resolved as follows: The respective XDG_* enivronment variable will always be used if specified Windows Use Known Folders. macOS Follow the Apple documentation on application-specific files. Linux/FreeBSD Follow the XDG Base Directory specification. Properties BinHome Base directory for executable files. public static string BinHome { get; } Property Value string A single base directory relative to which user-specifc executable files should be written. Remarks If XDG_BIN_HOME is set, the directory specified. Windows \"\" Windows does not support this by default. macOS \"\" macOS does not support this by default. Linux/FreeBSD $HOME/.local/bin NOTE: This is not an XDG standard but a de facto standard. CacheHome Base directory for non-essential data. public static string CacheHome { get; } Property Value string A single base directory relative to which user-specifc non-essential data should be written. Remarks If XDG_CACHE_HOME is set, the directory specified. Windows %LOCALAPPDATA%\\cache macOS $HOME/Library/Caches Linux/FreeBSD $HOME/.cache ConfigDirs A list of directories to look for configuration files. public static IList<string> ConfigDirs { get; } Property Value IList<string> A set of preference-ordered base directories to which configuration files should be searched. Remarks If XDG_CONFIG_DIRS is set, a list of the directories specified. Windows %ProgramData%, %APPADATA% macOS ~/Library/Preferences, /Library/Application Support, /Library/Preferences Linux/FreeBSD /etc/xdg This is typically not used, for most use cases ConfigHome should be used instead. ConfigHome Base directory for configuration files. public static string ConfigHome { get; } Property Value string A single base directory relative to which user-specifc configuration files should be written. Remarks If XDG_CONFIG_HOME is set, the directory specified. Windows %LOCALAPPDATA% macOS $HOME/Library/Application Support Linux/FreeBSD $HOME/.config DataDirs A list of directories to search for data files. public static IList<string> DataDirs { get; } Property Value IList<string> A set of preference-ordered base directories to which data files should be searched. Remarks If XDG_DATA_DIRS is set, a list of the directories specified. Windows %APPADATA%, %ProgramData% macOS /Library/Application Support Linux/FreeBSD /usr/local/share/, /usr/share/ DataHome Base directory for data files. public static string DataHome { get; } Property Value string A single base directory relative to which user-specifc data files should be written. Remarks If XDG_DATA_HOME is set, the directory specified. Windows %LOCALAPPDATA% macOS $HOME/Library/Application Support Linux/FreeBSD $HOME/.local/share RuntimeDir Base directory for runtime-specific files. public static string RuntimeDir { get; } Property Value string A single base directory relative to which user-specifc runtime files should be written. Remarks If XDG_RUNTIME_DIR is set, the directory specified. Windows %LOCALAPPDATA% macOS $HOME/Library/Application Support Linux/FreeBSD /run/user/$UID StateHome Base directory for state data. public static string StateHome { get; } Property Value string A single base directory relative to which user-specifc state data should be written. Remarks If XDG_STATE_HOME is set, the directory specified. Windows %LOCALAPPDATA% macOS $HOME/Library/Application Support Linux/FreeBSD $HOME/.local/state"
|
|
},
|
|
"api/Xdg.Directories.Other.html": {
|
|
"href": "api/Xdg.Directories.Other.html",
|
|
"title": "Class Other",
|
|
"keywords": "Class Other Namespace Xdg.Directories Assembly Xdg.Directories.dll Other useful directories that aren't specified by XDG. public static class Other Inheritance object Other Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Remarks These variables were graciously stolen from the excellent Go XDG implementation. That library largely inspired this one, absolutely recommended if you're working in Go. Properties Applications Application directories public static IList<string> Applications { get; } Property Value IList<string> Common application directories. Remarks Windows The Programs Special Folder, the Common Programs Special Folder macOS /Applications Linux/FreeBSD $XDG_DATA_HOME/applications, $HOME/.local/share/applications, /usr/local/share/applications, /usr/share/applications Fonts Font directories public static IList<string> Fonts { get; } Property Value IList<string> Common font directories. Remarks Windows %SYSTEMROOT%\\Fonts, %LOCALAPPDATA%\\Microsoft\\Windows\\Fonts macOS $HOME/Library/Fonts, /Library/Fonts, /System/Library/Fonts, /Network/Library/Fonts Linux/FreeBSD $XDG_DATA_HOME/fonts, $HOME/.fonts, $HOME/.local/share/fonts, /usr/local/share/fonts/usr/share/fonts Home Home Directory public static string Home { get; } Property Value string The current user's home directory. Remarks Windows %USERPROFILE% Unix (macOS/Linux/FreeBSD) $HOME"
|
|
},
|
|
"api/Xdg.Directories.UserDirectory.html": {
|
|
"href": "api/Xdg.Directories.UserDirectory.html",
|
|
"title": "Class UserDirectory",
|
|
"keywords": "Class UserDirectory Namespace Xdg.Directories Assembly Xdg.Directories.dll User directories are \"well known\" user directories, examples include the Desktop folder and the Documents folder. public static class UserDirectory Inheritance object UserDirectory Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Remarks For all user directories, the directories are resolved as follows: The respective XDG_* enivronment variable will always be used if specified Windows Use Known Folders. macOS Not sure where this is documented by Apple but it largely follows what Linux does. Linux/FreeBSD Follow what xdg-user-dirs sets. Properties DesktopDir Desktop folder public static string DesktopDir { get; } Property Value string The user's desktop directory. Remarks If XDG_DESKTOP_DIR is set, the directory specified. Windows The Desktop Special Folder macOS $HOME/Desktop Linux/FreeBSD $HOME/Desktop DocumentsDir Document folder public static string DocumentsDir { get; } Property Value string A location to store documents files. Remarks If XDG_DOCUMENTS_DIR is set, the directory specified. Windows The Documents Special Folder macOS $HOME/Documents Linux/FreeBSD $HOME/Documents DownloadDir Download folder public static string DownloadDir { get; } Property Value string A location to store downloaded files. Remarks If XDG_DOWNLOAD_DIR is set, the directory specified. Windows null Windows does not specify the Downloads folder in its magic folder list. macOS $HOME/Downloads Linux/FreeBSD $HOME/Downloads MusicDir Music folder public static string MusicDir { get; } Property Value string A location to store music files. Remarks If XDG_MUSIC_DIR is set, the directory specified. Windows The Music Special Folder macOS $HOME/Music Linux/FreeBSD $HOME/Music PicturesDir Image folder public static string PicturesDir { get; } Property Value string A location to store image files. Remarks If XDG_PICTURES_DIR is set, the directory specified. Windows The Pictures Special Folder macOS $HOME/Pictures Linux/FreeBSD $HOME/Pictures PublicDir Public folder public static string PublicDir { get; } Property Value string A location to store public / shared files. Remarks If XDG_PUBLICSHARE_DIR is set, the directory specified. Windows %PUBLIC% macOS $HOME/Public Linux/FreeBSD $HOME/Public TemplatesDir Template folder public static string TemplatesDir { get; } Property Value string A location to store template files. Remarks If XDG_TEMPLATES_DIR is set, the directory specified. Windows The Templates Special Folder macOS $HOME/Templates Linux/FreeBSD $HOME/Templatess VideosDir Video folder public static string VideosDir { get; } Property Value string A location to store video files. Remarks If XDG_VIDEOS_DIR is set, the directory specified. Windows The Videos Special Folder macOS $HOME/Movies Linux/FreeBSD $HOME/Videos"
|
|
},
|
|
"api/Xdg.Directories.html": {
|
|
"href": "api/Xdg.Directories.html",
|
|
"title": "Namespace Xdg.Directories",
|
|
"keywords": "Namespace Xdg.Directories Classes BaseDirectory The XDG Base Directory specification is a standard created by freedesktop.org that standardizes the location of storing application files. Other Other useful directories that aren't specified by XDG. UserDirectory User directories are \"well known\" user directories, examples include the Desktop folder and the Documents folder."
|
|
},
|
|
"docs/defaults.html": {
|
|
"href": "docs/defaults.html",
|
|
"title": "Default Locations",
|
|
"keywords": "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. Base Directory 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 User Directory 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 Extra Directories Windows macOS Linux/FreeBSD Home %USERPROFILE% $HOME $HOME Applications Programs, Common Programs /Applications $XDG_DATA_HOME/applications, $HOME/.local/share/applications, /usr/local/share/applications, /usr/share/applications Fonts %SYSTEMROOT%\\Fonts, %LOCALAPPDATA%\\Microsoft\\Windows\\Fonts $HOME/Library/Fonts, /Library/Fonts, /System/Library/Fonts, /Network/Library/Fonts $XDG_DATA_HOME/fonts, $HOME/.fonts, $HOME/.local/share/fonts, /usr/local/share/fonts, /usr/share/fonts"
|
|
},
|
|
"docs/installation.html": {
|
|
"href": "docs/installation.html",
|
|
"title": "Installation",
|
|
"keywords": "Installation Stable Releases 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 For bleeding edge users, preview releases are available. They are uploaded to two places automatically every commit: GitHub packages - A GitHub account is needed to download. Forgejo packages - No login required. Follow the directions at the respective links to install the package."
|
|
},
|
|
"docs/quick-use.html": {
|
|
"href": "docs/quick-use.html",
|
|
"title": "TL;DR",
|
|
"keywords": "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."
|
|
},
|
|
"index.html": {
|
|
"href": "index.html",
|
|
"title": "Xdg.Directories",
|
|
"keywords": "Xdg.Directories Want to get straight to the point? Check out the quick start guide. Xdg.Directories is a library that simplifies using the XDG Base Directory Specification and XDG user directories in .NET applications. Features Cross-platform: Supports Windows, MacOS and Linux/FreeBSD. Fast: The .dll is only 11 KB. Portable: Completely supports .NET Standard 2.0 and even NativeAOT! Simple: Easy to use API. Sane Defaults: Provides default directories for when the XDG environment variables are not set. These defaults are documented in the code itself and are also available here."
|
|
}
|
|
} |