Skip to content

A Crystal implementation of the XDG Base Directory specs

License

Notifications You must be signed in to change notification settings

apainintheneck/xdg_base_directory

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xdg_base_directory

An implementation of the XDG Base Directory specs in Crystal-lang

Installation

Add this to your application's shard.yml:

dependencies:
  xdg_base_directory:
    github: tijn/xdg_base_directory

Usage

require "xdg_base_directory"

xdg_dirs = XdgBaseDirectory.app_directories("my-awesome-app")

settings = xdg_dirs.config.read_file("settings.ini")
xdg_dirs.config.write_file("settings.ini.backup", setttings)

# open the cache directory
xdg_dirs.cache.to_dir # returns a Dir instance

# open the runtime directory
xdg_dirs.runtime_dir.to_dir # returns a Dir instance

Contributing

  1. Fork it ( https://github.com/tijn/xdg_base_directory/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • tijn Tijn Schuurmans - creator, maintainer

About

A Crystal implementation of the XDG Base Directory specs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Crystal 100.0%