xattr-0.5: Haskell binding to libattr

Portabilityonly tested with GHC
Stabilityexperimental
MaintainerEvan Klitzke <evan@eklitzke.org>

System.Xattr

Contents

Description

Relatively low-level interface to work with extended attributes on Unix systems. This is a fairly straightforward port of the API exposed by SGI's libattr.

Synopsis

Functions

setxattr :: String -> String -> ByteString -> XattrMode -> IO ()Source

Set an attribute on a regular file, by path

lsetxattr :: String -> String -> ByteString -> XattrMode -> IO ()Source

Like setxattr, but if the path is a symbolic link set the attribute on the link itself (not the file pointed to by the link)

fsetxattr :: Handle -> String -> ByteString -> XattrMode -> IO ()Source

Like setxattr, but use the handle specified rather than a file path

getxattr :: String -> String -> IO ByteStringSource

Get an attribute on a regular file, by path

lgetxattr :: String -> String -> IO ByteStringSource

Like getxattr, but if the path is a symbolic link get the attribute on the link itself (not the file pointed to by the link)

fgetxattr :: Handle -> String -> IO ByteStringSource

Like getxattr, but use the handle specified rather than a file path

listxattr :: String -> IO [String]Source

Get a list of all of the attributes set on a path

llistxattr :: String -> IO [String]Source

Like listxattr, but if the path is a symbolic link get the attributes on the link itsel (not the file pointed to by the link)

flistxattr :: Handle -> IO [String]Source

Like listxattr, but use the handle specified rather than a file path

Data Types