| darcs | Source code | Contents | Index

Darcs.SlurpDirectory

Synopsis

data Slurpy
empty_slurpy :: Slurpy
slurp :: FilePathLike p => p -> IO Slurpy
mmap_slurp :: FilePath -> IO Slurpy
co_slurp :: Slurpy -> FilePath -> IO Slurpy
slurp_unboring :: (FilePath -> Bool) -> FilePath -> IO Slurpy
type FileContents = ByteString
undefined_time :: EpochTime
undefined_size :: FileOffset
doesFileReallyExist :: FilePath -> IO Bool
doesDirectoryReallyExist :: FilePath -> IO Bool
isFileReallySymlink :: FilePath -> IO Bool
is_dir :: Slurpy -> Bool
is_file :: Slurpy -> Bool
get_slurp :: FileName -> Slurpy -> Maybe Slurpy
slurp_name :: Slurpy -> FilePath
slurp_has :: FilePath -> Slurpy -> Bool
slurp_has_anycase :: FilePath -> Slurpy -> Bool
slurp_hasfile :: FileName -> Slurpy -> Bool
slurp_hasdir :: FileName -> Slurpy -> Bool
list_slurpy :: Slurpy -> [FilePath]
list_slurpy_files :: Slurpy -> [FilePath]
list_slurpy_dirs :: Slurpy -> [FilePath]
get_path_list :: Slurpy -> FilePath -> [FilePath]
get_filecontents :: Slurpy -> FileContents
get_dircontents :: Slurpy -> [Slurpy]
get_mtime :: Slurpy -> EpochTime
get_length :: Slurpy -> FileOffset
slurp_modfile :: FileName -> (FileContents -> Maybe FileContents) -> Slurpy -> Maybe Slurpy
slurp_remove :: FileName -> Slurpy -> Maybe Slurpy
slurp_removefile :: FileName -> Slurpy -> Maybe Slurpy
slurp_removedir :: FileName -> Slurpy -> Maybe Slurpy
write_files :: Slurpy -> [FilePath] -> IO ()
data SlurpMonad a
withSlurpy :: Slurpy -> SlurpMonad a -> Either String (Slurpy, a)
writeSlurpy :: Slurpy -> FilePath -> IO ()
syncSlurpy :: (Slurpy -> IO Slurpy) -> Slurpy -> IO Slurpy

Documentation

data Slurpy | Source

Instances

Eq Slurpy
Ord Slurpy
Show Slurpy

empty_slurpy :: Slurpy | Source

slurp :: FilePathLike p => p -> IO Slurpy | Source

mmap_slurp :: FilePath -> IO Slurpy | Source

co_slurp :: Slurpy -> FilePath -> IO Slurpy | Source

slurp_unboring :: (FilePath -> Bool) -> FilePath -> IO Slurpy | Source

type FileContents = ByteString | Source

undefined_time :: EpochTime | Source

undefined_size :: FileOffset | Source

doesFileReallyExist :: FilePath -> IO Bool | Source

doesDirectoryReallyExist :: FilePath -> IO Bool | Source

isFileReallySymlink :: FilePath -> IO Bool | Source

is_dir :: Slurpy -> Bool | Source

is_file :: Slurpy -> Bool | Source

get_slurp :: FileName -> Slurpy -> Maybe Slurpy | Source

slurp_name :: Slurpy -> FilePath | Source

slurp_has :: FilePath -> Slurpy -> Bool | Source

slurp_has_anycase :: FilePath -> Slurpy -> Bool | Source

slurp_hasfile :: FileName -> Slurpy -> Bool | Source

slurp_hasdir :: FileName -> Slurpy -> Bool | Source

list_slurpy :: Slurpy -> [FilePath] | Source

list_slurpy_files :: Slurpy -> [FilePath] | Source

list_slurpy_dirs :: Slurpy -> [FilePath] | Source

get_path_list :: Slurpy -> FilePath -> [FilePath] | Source

get_filecontents :: Slurpy -> FileContents | Source

get_dircontents :: Slurpy -> [Slurpy] | Source

get_mtime :: Slurpy -> EpochTime | Source

get_length :: Slurpy -> FileOffset | Source

slurp_modfile :: FileName -> (FileContents -> Maybe FileContents) -> Slurpy -> Maybe Slurpy | Source

Code to modify a given file in a slurpy.

slurp_remove :: FileName -> Slurpy -> Maybe Slurpy | Source

A variant of `get_slurp_context` that allows for replacing the child slurpy by a list of slurpies. The result of the update function will always be a singleton list unless the child slurpy was at the top level. Currently unused. get_slurp_context_list :: FileName -> Slurpy -> Maybe ([Slurpy] -> [Slurpy], Slurpy) get_slurp_context_list = get_slurp_context_generic return id

It is important to be able to readily modify a slurpy.

slurp_removefile :: FileName -> Slurpy -> Maybe Slurpy | Source

slurp_removedir :: FileName -> Slurpy -> Maybe Slurpy | Source

write_files :: Slurpy -> [FilePath] -> IO () | Source

data SlurpMonad a | Source

Instances

Monad SlurpMonad
Functor SlurpMonad
MonadPlus SlurpMonad
WriteableDirectory SlurpMonad
ReadableDirectory SlurpMonad
RepoPatch p => MatchMonad SlurpMonad p

withSlurpy :: Slurpy -> SlurpMonad a -> Either String (Slurpy, a) | Source

writeSlurpy :: Slurpy -> FilePath -> IO () | Source

syncSlurpy :: (Slurpy -> IO Slurpy) -> Slurpy -> IO Slurpy | Source

Produced by Haddock version 2.4.2