|
Subversion.FileSystem.Transaction |
|
|
|
|
Description |
An interface to functions that work on a filesystem transaction.
|
|
Synopsis |
|
|
|
|
Type
|
|
data Txn a |
Txn a is a FS monad which reads and updates data in filesystem
and finally returns a. See MonadFS.
| Instances | |
|
|
Accessing transaction property
|
|
getTxnProp :: String -> Txn (Maybe String) |
getTxnProp propName returns the value of the property named
propName on the transaction.
|
|
getTxnPropList :: Txn [(String, String)] |
getTxnPropList returns the entire property list on the
transaction.
|
|
setTxnProp :: String -> Maybe String -> Txn () |
setTxnProp propName propValue changes, adds or deletes a
property on the transaction.
|
|
Changing content of file
|
|
applyText |
:: FilePath | The file to be replaced. If it does not exist
in the transaction, applyText throws an
error. That is, you can't use this action to
create new files; use makeFile to create an
empty file first.
| -> Maybe String | The hex MD5 digest for the new content. It is
ignored if Nothing, but if not
Nothing, it must match the checksum
of the content; if it doesn't, applyText
throws an error.
| -> String | The new content.
This argument is currently a String
but someday it may be changed to
[Word8] or something alike. See
getFileContents.
| -> Txn () | | applyText replaces the content of file.
|
|
|
applyTextLBS :: FilePath -> Maybe String -> LazyByteString -> Txn () |
applyTextLBS does the same thing as applyText but takes
LazyByteString instead.
|
|
Changing node property
|
|
setNodeProp :: FilePath -> String -> Maybe String -> Txn () |
setNodeProp fpath propName propValue changes, adds or deletes
a property named propName on file fpath.
|
|
Creating, deleting and copying entry
|
|
makeFile :: FilePath -> Txn () |
makeFile fpath creates a new file named fpath. The initial
content of file is the empty string, and it has no properties.
|
|
makeDirectory :: FilePath -> Txn () |
makeDirectory fpath creates a new directory named fpath. The
new directory has no entries, and no properties.
|
|
deleteEntry :: FilePath -> Txn () |
deleteEntry fpath delete the node named fpath in the
transaction. If the node being deleted is a directory, its contents
will be deleted recursively.
If the fpath is missing from the transaction, deleteEntry
throws an error.
Attempting to remove the root directory also results in an error,
even if the directory is empty.
|
|
copyEntry :: RevNum -> FilePath -> FilePath -> Txn () |
copyEntry fromRevNum fromPath toPath creates a copy of file
fromPath in a revision fromRevNum named toPath in the
transaction.
|
|
Produced by Haddock version 0.8 |