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
-
UserDirectory
- Inherited Members
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
|