Safe Haskell | None |
---|
XAttr provides bindings to the glibc functions for reading and
manipulating extended attributes (setxattr
, getxattr
, listxattr
,
...). Each function in this module has two variants: the one with the
name prefixed by "l" and "fd". Both of these are identical to the
original version except that the "l"-variant does not follow
symbolic link but acts on the link itself, and the "fd"-variant take
a file descriptor as argument rather than a
.
FilePath
- setXAttr :: FilePath -> String -> ByteString -> IO ()
- lSetXAttr :: FilePath -> String -> ByteString -> IO ()
- fdSetXAttr :: Fd -> String -> ByteString -> IO ()
- createXAttr :: FilePath -> String -> ByteString -> IO ()
- lCreateXAttr :: FilePath -> String -> ByteString -> IO ()
- fdCreateXAttr :: Fd -> String -> ByteString -> IO ()
- replaceXAttr :: FilePath -> String -> ByteString -> IO ()
- lReplaceXAttr :: FilePath -> String -> ByteString -> IO ()
- fdReplaceXAttr :: Fd -> String -> ByteString -> IO ()
- getXAttr :: FilePath -> String -> IO ByteString
- lGetXAttr :: FilePath -> String -> IO ByteString
- fdGetXAttr :: Fd -> String -> IO ByteString
- listXAttr :: FilePath -> IO [String]
- lListXAttr :: FilePath -> IO [String]
- fdListXAttr :: Fd -> IO [String]
- removeXAttr :: FilePath -> String -> IO ()
- lRemoveXAttr :: FilePath -> String -> IO ()
- fdRemoveXAttr :: Fd -> String -> IO ()
Set extended attributes
:: FilePath | target file |
-> String | name of attribute to set |
-> ByteString | value of attribute |
-> IO () |
Set the value of an extended attribute.
lSetXAttr :: FilePath -> String -> ByteString -> IO ()Source
Set the value of an extended attribute (do not follow symbolic links).
fdSetXAttr :: Fd -> String -> ByteString -> IO ()Source
Set the value of an extended attribute.
Create extended attributes
createXAttr :: FilePath -> String -> ByteString -> IO ()Source
Identical to
, but if the attribute already exists
fail and set errno to EEXIST.
setXAttr
lCreateXAttr :: FilePath -> String -> ByteString -> IO ()Source
Identical to
, but if the attribute already exists
fail and set errno to EEXIST.
lSetXAttr
fdCreateXAttr :: Fd -> String -> ByteString -> IO ()Source
Identical to
, but if the attribute already exists
fail and set errno to EEXIST.
fdSetXAttr
Replace extended attributes
replaceXAttr :: FilePath -> String -> ByteString -> IO ()Source
Identical to
, but if the attribute does not exist
fail and set errno to ENOATTR.
setXAttr
lReplaceXAttr :: FilePath -> String -> ByteString -> IO ()Source
Identical to
, but if the attribute does not exist
fail and set errno to ENOATTR.
lSetXAttr
fdReplaceXAttr :: Fd -> String -> ByteString -> IO ()Source
Identical to
, but if the attribute does not exist
fail and set errno to ENOATTR.
fdSetXAttr
Retrive extended attributes
:: FilePath | target file |
-> String | name of the attribute |
-> IO ByteString | value of the attribute |
Get the value of an extended attribute.
lGetXAttr :: FilePath -> String -> IO ByteStringSource
Get the value of an extended attribute (do not follow symbolic links).
fdGetXAttr :: Fd -> String -> IO ByteStringSource
Get the value of an extended attribute.
List extended attributes
Get the list of attribute names associated with the given
.
FilePath
lListXAttr :: FilePath -> IO [String]Source
Get the list of attribute names associated with the given
(do not follow symbolic links).
FilePath
fdListXAttr :: Fd -> IO [String]Source
Get the list of attribute names associated with the given file descriptor.
Remove extended attributes
Remove an extended attribute from the given
.
FilePath
lRemoveXAttr :: FilePath -> String -> IO ()Source
Remove an extended attribute from the given
(do not follow
symbolic links).
FilePath
fdRemoveXAttr :: Fd -> String -> IO ()Source
Remove an extended attribute from the given file descriptor.