Name: xattr
Owner: pkg
Description: Extended attribute support for Go (linux + darwin + freebsd)
Created: 2016-10-29 23:45:56.0
Updated: 2018-01-09 22:54:18.0
Pushed: 2017-08-08 19:02:15.0
Homepage: null
Size: 21
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Extended attribute support for Go (linux + darwin + freebsd).
“Extended attributes are name:value pairs associated permanently with files and directories, similar to the environment strings associated with a process. An attribute may be defined or undefined. If it is defined, its value may be empty or non-empty.” See more…
nst path = "/tmp/myfile"
nst prefix = "user."
err := xattr.Set(path, prefix+"test", []byte("test-attr-value")); err != nil {
log.Fatal(err)
r list []string
list, err = xattr.List(path); err != nil {
log.Fatal(err)
r data []byte
data, err = xattr.Get(path, prefix+"test"); err != nil {
log.Fatal(err)
err = xattr.Remove(path, prefix+"test"); err != nil {
log.Fatal(err)