darcs-2.2.1: a distributed, interactive, smart revision control systemSource codeContentsIndex
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
wait_a_moment :: IO ()
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
show/hide Instances
data SlurpyContents Source
Constructors
SlurpDir (Maybe String) SlurpyMap
SlurpFile (Maybe String, EpochTime, FileOffset) FileContents
slurpies_to_map :: [Slurpy] -> SlurpyMapSource
map_to_slurpies :: SlurpyMap -> [Slurpy]Source
type FileContents = ByteStringSource
empty_slurpy :: SlurpySource
slurp :: FilePathLike p => p -> IO SlurpySource
mmap_slurp :: FilePath -> IO SlurpySource
slurp_unboring :: (FilePath -> Bool) -> FilePath -> IO SlurpySource
co_slurp :: Slurpy -> FilePath -> IO SlurpySource
slurp_name :: Slurpy -> FilePathSource
is_file :: Slurpy -> BoolSource
is_dir :: Slurpy -> BoolSource
get_filecontents :: Slurpy -> FileContentsSource
get_dircontents :: Slurpy -> [Slurpy]Source
get_mtime :: Slurpy -> EpochTimeSource
get_length :: Slurpy -> FileOffsetSource
get_slurp :: FileName -> Slurpy -> Maybe SlurpySource
slurp_removefile :: FileName -> Slurpy -> Maybe SlurpySource
slurp_removedir :: FileName -> Slurpy -> Maybe SlurpySource
slurp_remove :: FileName -> Slurpy -> Maybe SlurpySource

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 SlurpySource
Code to modify a given file in a slurpy.
slurp_hasfile :: FileName -> Slurpy -> BoolSource
slurp_hasdir :: FileName -> Slurpy -> BoolSource
slurp_has_anycase :: FilePath -> Slurpy -> BoolSource
wait_a_moment :: IO ()Source
undefined_time :: EpochTimeSource
undefined_size :: FileOffsetSource
slurp_has :: FilePath -> Slurpy -> BoolSource
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 BoolSource
doesFileReallyExist :: FilePath -> IO BoolSource
doesDirectoryReallyExist :: FilePath -> IO BoolSource
data SlurpMonad a Source
show/hide Instances
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 SlurpySource
Produced by Haddock version 2.4.2