| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Main
- debugRef :: IORef Bool
- debug :: Bool
- depth :: FilePath -> Int
- replaceDir :: String -> String -> String -> String
- replaceDir' :: Text -> Text -> Text -> Text
- eitherFiles :: FindClause Bool -> (Text -> Text -> Sh a) -> (Text -> Text -> Sh a) -> Text -> Text -> Sh ([a], [a])
- eitherFiles_ :: FindClause Bool -> (Text -> Text -> Sh ()) -> (Text -> Text -> Sh ()) -> Text -> Text -> Sh ()
- eitherDirs :: FindClause Bool -> (Text -> Text -> Sh a) -> (Text -> Text -> Sh b) -> Text -> Text -> Sh ([a], [b])
- filtSplitFiles :: MonadIO m => FindClause Bool -> FindClause Bool -> (Text -> Text -> m a) -> (Text -> Text -> m b) -> Text -> Text -> m ([a], [b])
- bogoCopy :: FindClause Bool -> Text -> Text -> Sh ()
- fromPath :: FilePath -> String
- fileSize' :: FilePath -> IO FileOffset
- hasSize :: (FileOffset -> b) -> FilePath -> IO b
- real_cp :: Text -> Text -> Sh ()
- zero_cp :: Text -> Text -> Sh ()
- time_cp :: Text -> Text -> Sh ()
- tree_cp :: Text -> Text -> Sh ()
- mainSh :: String -> String -> COff -> IO ()
- main :: IO ()
Documentation
replaceDir :: String -> String -> String -> String Source #
basically, makes srcFile relative to srcDir, then substitutes in dstDir instead.
will throw exception on empty strings.
eitherFiles :: FindClause Bool -> (Text -> Text -> Sh a) -> (Text -> Text -> Sh a) -> Text -> Text -> Sh ([a], [a]) Source #
eitherFiles pred f g src dst -- where src and dst are directory names, will process all the files under src according to pred. If they pass, it processes them with "f" (takes the src file path and the dest file path), otherwise with "g".
eitherFiles_ :: FindClause Bool -> (Text -> Text -> Sh ()) -> (Text -> Text -> Sh ()) -> Text -> Text -> Sh () Source #
same as eitherFiles, but return Sh ().
eitherDirs :: FindClause Bool -> (Text -> Text -> Sh a) -> (Text -> Text -> Sh b) -> Text -> Text -> Sh ([a], [b]) Source #
filtSplitFiles :: MonadIO m => FindClause Bool -> FindClause Bool -> (Text -> Text -> m a) -> (Text -> Text -> m b) -> Text -> Text -> m ([a], [b]) Source #
filtSplitFiles filterPred splitPred f g src dst:
iterate over the files in directory src. filter for ones matching filterPred, discarding all others. then split them into 2 - those matching splitPred, and those not. On those that do, execute f, on the others, execute g. Return the results
bogoCopy :: FindClause Bool -> Text -> Text -> Sh () Source #
bogoCopy pred srcDir dstDir: make a clone of srcDir at dstDir;
but if a file passes "pred", then make a real copy,
but if not, just make a zero-size sparse file with the same
name and attributes.
bogoCopy
:: System.FilePath.Find.FindClause Bool
tree_cp :: Text -> Text -> Sh () Source #
make copy of directory tree. should preserve modification times, ownership/permissions