HsSVN-0.4.3.1: Partial Subversion (SVN) binding for HaskellContentsIndex
Subversion.FileSystem
Contents
Type
Information of the libsvn_fs itself
Filesystem creation, opening and destruction
Accessors
Description
An interface to the Subversion filesystem.
Synopsis
data FileSystem
fsVersion :: IO Version
createFileSystem :: FilePath -> [(String, String)] -> IO FileSystem
fsConfigFSType :: String
fsTypeBDB :: String
fsTypeFSFS :: String
openFileSystem :: FilePath -> [(String, String)] -> IO FileSystem
deleteFileSystem :: FilePath -> IO ()
hotCopyFileSystem :: FilePath -> FilePath -> Bool -> IO ()
getFileSystemType :: FilePath -> IO String
getFileSystemPath :: FileSystem -> IO FilePath
getYoungestRev :: FileSystem -> IO RevNum
Type
data FileSystem
FileSystem is an opaque object representing a Subversion filesystem.
Information of the libsvn_fs itself
fsVersion :: IO Version
fsVersion returns the version number of the libsvn_fs.
Filesystem creation, opening and destruction
createFileSystem
:: FilePathWhere to create the filesystem. The path most not currently exist, but its parent must exist.
-> [(String, String)]

A list of (key, value) tuples which modifies the behavior of the filesystem. The interpretation of it is up to the filesystem back-end.

If the list contains a value for fsConfigFSType, that value determines the filesystem type for the new filesystem. These values are currently defined:

fsTypeBDB
Berkeley-DB implementation
fsTypeFSFS
Native-filesystem implementation

If the list does not contain fsConfigFSType then the default filesystem type will be used. This will typically be BDB for version 1.1 and FSFS for later versions, though you should not rely upon any particular default value if you want a filesystem of specific type.

-> IO FileSystemThe new filesystem.
createFileSystem creates a new, empty Subversion filesystem. Note that creating a raw filesystem and creating a repository is not the same thing. If you want a new repository, use Subversion.Repository.createRepository instead.
fsConfigFSType :: String
fsConfigFSType is a config key to choose a filesystem back-end.
fsTypeBDB :: String
fsTypeBDB is a config value representing the Berkeley-DB back-end.
fsTypeFSFS :: String
fsTypeFSFS is a config value representing the Native-filesystem back-end.
openFileSystem
:: FilePathWhere the filesystem located on.
-> [(String, String)]A list of (key, value) tuples which modifies the behavior of the filesystem. The interpretation of it is up to the filesystem back-end.
-> IO FileSystem
openFileSystem opens a Subversion filesystem. Note that you probably don't want to use this directly. Take a look at Subversion.Repository.openRepository instead.
deleteFileSystem :: FilePath -> IO ()
deleteFileSystem deletes a Subversion filesystem. Note that you probably don't want to use this directly. Take a look at Subversion.Repository.deleteRepository instead.
hotCopyFileSystem
:: FilePathSource
-> FilePathDestination
-> BoolIf True, hotCopyFileSystem performs cleanup on the source filesystem as part of the copy opeation; currently, this means deleting copied, unused logfiles for a Berkeley DB source filesystem.
-> IO ()
hotCopyFileSystem copies a possibly live Subversion filesystem from one location to another.
Accessors
getFileSystemType :: FilePath -> IO String

getFileSystemPath fsPath returns a string identifying the back-end type of the Subversion filesystem located on fsPath. The string should be equal to one of the fsType* defined constants, unless the filesystem is a new back-end type added in a later version of Subversion.

In general, the type should make no difference in the filesystem's semantics, but there are a few situations (such as backups) where it might matter.

getFileSystemPath :: FileSystem -> IO FilePath
getFileSystemPath fs returns the path to fs's repository. Note that this is what was passed to createFileSystem or openFileSystem; might be absolute, might be not.
getYoungestRev :: FileSystem -> IO RevNum
getYoungestRev fs returns the youngest revision number in filesystem fs. The revision number starts from zero.
Produced by Haddock version 2.6.0