darcs-2.12.5: a distributed, interactive, smart revision control system

Safe Haskell | None
Language | Haskell2010

Darcs.Repository.HashedIO

Synopsis

- type HashedIO p = StateT (HashDir RW p) IO
- copyHashed :: String -> Cache -> WithWorkingDir -> String -> IO ()
- copyPartialsHashed :: FilePathLike fp => Cache -> String -> [fp] -> IO ()
- cleanHashdir :: Cache -> HashedDir -> [String] -> IO ()
- getHashedFiles :: String -> [String] -> IO [String]
- data RW = RW
- pathsAndContents :: FilePath -> Cache -> String -> IO [(FilePath, ByteString)]

# Documentation

type HashedIO p = StateT (HashDir RW p) IO #

copyHashed :: String -> Cache -> WithWorkingDir -> String -> IO () #

Grab a whole pristine tree from a hash, and, if asked, write files in the working copy.

copyPartialsHashed :: FilePathLike fp => Cache -> String -> [fp] -> IO () #

cleanHashdir :: Cache -> HashedDir -> [String] -> IO () #

getHashedFiles :: String -> [String] -> IO [String] #

getHashedFiles returns all hash files targeted by files in hashroots in the hashdir directory.

data RW #

Constructors

RW |

Instances

ApplyMonad Tree (HashedIO p) # |
Associated Types type ApplyMonadBase (HashedIO p :: * -> *) :: * -> * # Methods nestedApply :: HashedIO p x -> Tree (ApplyMonadBase (HashedIO p)) -> HashedIO p (x, Tree (ApplyMonadBase (HashedIO p))) # liftApply :: (Tree (ApplyMonadBase (HashedIO p)) -> ApplyMonadBase (HashedIO p) x) -> Tree (ApplyMonadBase (HashedIO p)) -> HashedIO p (x, Tree (ApplyMonadBase (HashedIO p))) # getApplyState :: HashedIO p (Tree (ApplyMonadBase (HashedIO p))) #
ApplyMonadTree (HashedIO p) # |
Methods mDoesDirectoryExist :: FileName -> HashedIO p Bool # mDoesFileExist :: FileName -> HashedIO p Bool # mReadFilePS :: FileName -> HashedIO p ByteString # mReadFilePSs :: FileName -> HashedIO p [ByteString] # mCreateDirectory :: FileName -> HashedIO p () # mRemoveDirectory :: FileName -> HashedIO p () # mCreateFile :: FileName -> HashedIO p () # mRemoveFile :: FileName -> HashedIO p () # mRename :: FileName -> FileName -> HashedIO p () # mModifyFilePS :: FileName -> (ByteString -> HashedIO p ByteString) -> HashedIO p () # mModifyFilePSs :: FileName -> ([ByteString] -> HashedIO p [ByteString]) -> HashedIO p () # mChangePref :: String -> String -> String -> HashedIO p () #
type ApplyMonadBase (HashedIO p) # |
type ApplyMonadBase (HashedIO p) = IO

pathsAndContents :: FilePath -> Cache -> String -> IO [(FilePath, ByteString)] #

Returns a list of pairs (FilePath, (strict) ByteString) of the pristine tree starting with the hash `root`. `path` should be either "." or end with "/" Separator "/" is used since this function is used to generate zip archives from pristine trees.