xattr

Bindings for XATTR xattr
0.4.0 released
ettomatic/xattr
8 2
Ettore Berardi

XAttr

Build Status

Crystal bindings to XATTR.

This library allow to manage extended file attributes (XATTR) as file metadata.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      xattr:
        github: ettomatic/xattr
    
  2. Run shards install

Usage

require "xattr"

 xattr = XAttr.new("./myfile.txt")
 xattr["tags"] = "mytag1,mytag2"
 xattr["tags"]
 # => "mytag1,mytag2"

 xattr.list
 # => ["tags"]

 xattr.remove("tags")
 xattr.list
 # => []

 xattr["tags"]
 # => nil

Contributing

  1. Fork it (https://github.com/ettomatic/xattr/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

xattr:
  github: ettomatic/xattr
  version: ~> 0.4.0
License MIT
Crystal 0.35.0

Authors

Dependencies 0

Development Dependencies 0

Dependents 0

Last synced .
search fire star recently