| darcs-2.4.3: a distributed, interactive, smart revision control system | Source code | Contents | Index
Darcs.SlurpDirectory.Internal
Description
SlurpDirectory is intended to give a nice lazy way of traversing directory trees.
Synopsis
data Slurpy = Slurpy !FileName !SlurpyContents
data SlurpyContents
= SlurpDir (Maybe String) SlurpyMap
| SlurpFile (Maybe String, EpochTime, FileOffset) FileContents
slurpies_to_map :: [Slurpy] -> SlurpyMap
map_to_slurpies :: SlurpyMap -> [Slurpy]
type FileContents = ByteString
empty_slurpy :: Slurpy
slurp :: FilePathLike p => p -> IO Slurpy
mmap_slurp :: FilePath -> IO Slurpy
slurp_unboring :: (FilePath -> Bool) -> FilePath -> IO Slurpy
co_slurp :: Slurpy -> FilePath -> IO Slurpy
slurp_name :: Slurpy -> FilePath
is_file :: Slurpy -> Bool
is_dir :: Slurpy -> Bool
get_filecontents :: Slurpy -> FileContents
get_dircontents :: Slurpy -> [Slurpy]
get_mtime :: Slurpy -> EpochTime
get_length :: Slurpy -> FileOffset
get_slurp :: FileName -> Slurpy -> Maybe Slurpy
slurp_removefile :: FileName -> Slurpy -> Maybe Slurpy
slurp_removedir :: FileName -> Slurpy -> Maybe Slurpy
slurp_remove :: FileName -> Slurpy -> Maybe Slurpy
slurp_modfile :: FileName -> (FileContents -> Maybe FileContents) -> Slurpy -> Maybe Slurpy
slurp_hasfile :: FileName -> Slurpy -> Bool
slurp_hasdir :: FileName -> Slurpy -> Bool
slurp_has_anycase :: FilePath -> Slurpy -> Bool
undefined_time :: EpochTime
undefined_size :: FileOffset
slurp_has :: FilePath -> Slurpy -> Bool
list_slurpy :: Slurpy -> [FilePath]
list_slurpy_files :: Slurpy -> [FilePath]
get_path_list :: Slurpy -> FilePath -> [FilePath]
list_slurpy_dirs :: Slurpy -> [FilePath]
isFileReallySymlink :: FilePath -> IO Bool
doesFileReallyExist :: FilePath -> IO Bool
doesDirectoryReallyExist :: FilePath -> IO Bool
data SlurpMonad a
withSlurpy :: Slurpy -> SlurpMonad a -> Either String (Slurpy, a)
write_files :: Slurpy -> [FilePath] -> IO ()
writeSlurpy :: Slurpy -> FilePath -> IO ()
syncSlurpy :: (Slurpy -> IO Slurpy) -> Slurpy -> IO Slurpy
Documentation
data Slurpy | Source
Constructors
Slurpy !FileName !SlurpyContents |
Instances
Eq Slurpy
Ord Slurpy
Show Slurpy
data SlurpyContents | Source
Constructors
SlurpDir (Maybe String) SlurpyMap |
SlurpFile (Maybe String, EpochTime, FileOffset) FileContents |
slurpies_to_map :: [Slurpy] -> SlurpyMap | Source
map_to_slurpies :: SlurpyMap -> [Slurpy] | Source
type FileContents = ByteString | Source
empty_slurpy :: Slurpy | Source
slurp :: FilePathLike p => p -> IO Slurpy | Source
mmap_slurp :: FilePath -> IO Slurpy | Source
slurp_unboring :: (FilePath -> Bool) -> FilePath -> IO Slurpy | Source
co_slurp :: Slurpy -> FilePath -> IO Slurpy | Source
slurp_name :: Slurpy -> FilePath | Source
is_file :: Slurpy -> Bool | Source
is_dir :: Slurpy -> Bool | Source
get_filecontents :: Slurpy -> FileContents | Source
get_dircontents :: Slurpy -> [Slurpy] | Source
get_mtime :: Slurpy -> EpochTime | Source
get_length :: Slurpy -> FileOffset | Source
get_slurp :: FileName -> Slurpy -> Maybe Slurpy | Source
slurp_removefile :: FileName -> Slurpy -> Maybe Slurpy | Source
slurp_removedir :: FileName -> Slurpy -> Maybe Slurpy | Source
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_modfile :: FileName -> (FileContents -> Maybe FileContents) -> Slurpy -> Maybe Slurpy | Source
Code to modify a given file in a slurpy.
slurp_hasfile :: FileName -> Slurpy -> Bool | Source
slurp_hasdir :: FileName -> Slurpy -> Bool | Source
slurp_has_anycase :: FilePath -> Slurpy -> Bool | Source
undefined_time :: EpochTime | Source
undefined_size :: FileOffset | Source
slurp_has :: FilePath -> Slurpy -> Bool | Source
list_slurpy :: Slurpy -> [FilePath] | Source
list_slurpy_files :: Slurpy -> [FilePath] | Source
get_path_list :: Slurpy -> FilePath -> [FilePath] | Source
list_slurpy_dirs :: Slurpy -> [FilePath] | Source
isFileReallySymlink :: FilePath -> IO Bool | Source
doesFileReallyExist :: FilePath -> IO Bool | Source
doesDirectoryReallyExist :: FilePath -> IO Bool | 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
write_files :: Slurpy -> [FilePath] -> IO () | Source
writeSlurpy :: Slurpy -> FilePath -> IO () | Source
syncSlurpy :: (Slurpy -> IO Slurpy) -> Slurpy -> IO Slurpy | Source
Produced by Haddock version 2.4.2