GithubHelp home page GithubHelp logo

xdg-net / xdg.directories Goto Github PK

View Code? Open in Web Editor NEW
2.0 0.0 0.0 5.01 MB

A .NET library for the XDG directory specifications

Home Page: https://xdg-net.github.io/Xdg.Directories/

License: MIT License

Makefile 3.73% F# 3.77% C# 89.75% C 2.74%
dotnet dotnet-core dotnet-standard xdg xdg-user-dirs xdg-basedir csharp fsharp cross-platform known-folders

xdg.directories's Introduction

Xdg.Directories

A .NET Standard library for the XDG Base Directory Specification and XDG user directories.

GitHub Actions Workflow Status NuGet Version Documentation MIT License

Xdg.Directories is 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.

Full documentation can be found at https://xdg-net.github.io/Xdg.Directories.

Installation

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

Preview releases are uploaded to both GitHub packages (need GitHub account to download) and Forgejo packages (no login required).

Usage

Base Directories, C#

using System;
using Xdg.Directories;

// Prints /home/$USER/.local/share
Console.Writeline(BaseDirectory.DataHome);

// Prints /home/$USER/.cache
Console.Writeline(BaseDirectory.CacheHome)

User Directories, F#

open Xdg.Directories

// Prints /home/$USER/Documents
printfn "%s" UserDirectory.DesktopDir

License

This project is licensed under the MIT license.
Icon is made by Emoji One, CC BY-SA 4.0, via Wikimedia Commons an image.

xdg.directories's People

Contributors

dependabot[bot] avatar samtherapy avatar

Stargazers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.