Giter Club home page Giter Club logo

odin-xdg's Introduction

odin-xdg

This package provides a basic interface for the XDG Base Directory Specification

Provided Procedures

  • config_home() -> (string, Error)
  • cache_home() -> (string, Error)
  • data_home() -> (string, Error)
  • state_home() -> (string, Error)
  • runtime_dir() -> (string, Error)
  • data_dirs() -> ([]string, Error)
  • config_dirs() -> ([]string, Error)

All procedures will return the directories as configured by their relevant environment variables, if set, or the defaults prescribed in the spec otherwise.

Considerations

odin-xdg assumes Linux as the host. I may refactor this to be more portable, but Linux is the primary target.

The runtime_dir procedure requires retrieving the UID in order to calculate the return value (default: /run/user/$UID). To my knowledge (and I did hunt) there is no good documented way to do this in Odin yet. Consequently, odin-xdg relies on some of the deeper parts of core that you won't find in the package docs.

I don't know how likely those parts are to change, though I know gingerBill has some packages in there that are dummy packages for future work. As such, I cannot guarantee that a future update to the language won't unexpectedly break this package. Buyer beware.

License

BSD-3

odin-xdg's People

Contributors

dogue avatar

Watchers

 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.