Portability | only tested with GHC |
---|---|
Stability | experimental |
Maintainer | Evan Klitzke <evan@eklitzke.org> |
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.
- setxattr :: String -> String -> ByteString -> XattrMode -> IO ()
- lsetxattr :: String -> String -> ByteString -> XattrMode -> IO ()
- fsetxattr :: Handle -> String -> ByteString -> XattrMode -> IO ()
- getxattr :: String -> String -> IO ByteString
- lgetxattr :: String -> String -> IO ByteString
- fgetxattr :: Handle -> String -> IO ByteString
- listxattr :: String -> IO [String]
- llistxattr :: String -> IO [String]
- flistxattr :: Handle -> IO [String]
- data XattrMode
- = RegularMode
- | CreateMode
- | ReplaceMode
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
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
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