Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dlech/xdg-base-directory
.NET class for freedesktop XDG base directories specification
https://github.com/dlech/xdg-base-directory
Last synced: about 1 month ago
JSON representation
.NET class for freedesktop XDG base directories specification
- Host: GitHub
- URL: https://github.com/dlech/xdg-base-directory
- Owner: dlech
- License: mit
- Created: 2015-10-02T16:04:54.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-05T23:03:41.000Z (about 9 years ago)
- Last Synced: 2024-11-04T16:08:10.656Z (about 2 months ago)
- Language: Pascal
- Size: 141 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# xdg-base-directory
.NET class for [freedesktop XDG base directories specification](http://standards.freedesktop.org/basedir-spec/basedir-spec-0.8.html)Install with [nuget](https://www.nuget.org/packages/Freedesktop.Xdg.BaseDirectory.Sources):
Install-Package Freedesktop.Xdg.BaseDirectory.Sources
Use it to find files:
using System.IO;
using MyNamespace.Freedesktop.Xdg;
var myFileName = BaseDirectory.FindDataFile (Path.Combine ("my-package", "data.file"));
if (myFileName == null) {
throw new FileNotFoundException ("Could not find data.file in XDG data directories");
}