diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-16 14:58:35 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-16 14:58:35 -0400 |
commit | e80160380a16fbeb38f21f4683917b49a9221a91 (patch) | |
tree | f309eb102278191039a6f9690f72e579f7ceb1f0 /Utility.hs | |
parent | bfa581a218719c46dbc19a212a005b0cf2e145c2 (diff) |
now finds files in git or not depending on what command wants
Diffstat (limited to 'Utility.hs')
-rw-r--r-- | Utility.hs | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/Utility.hs b/Utility.hs index 8005fd17c..e4278ff3f 100644 --- a/Utility.hs +++ b/Utility.hs @@ -6,8 +6,7 @@ module Utility ( hGetContentsStrict, parentDir, relPathCwdToDir, - relPathDirToDir, - recurseFiles, + relPathDirToDir ) where import System.IO @@ -89,15 +88,3 @@ relPathDirToDir from to = dotdots = take ((length pfrom) - numcommon) $ repeat ".." numcommon = length $ common path = join s $ dotdots ++ uncommon - -{- Recursively returns all files and symlinks (to anything) in the specified - - path. If the path is a file, returns only it. Does not follow symlinks to - - directories. -} -recurseFiles :: FilePath -> IO [FilePath] -recurseFiles path = do - find <- recurseDirStat SystemFS path - return $ filesOnly find - where - filesOnly l = map (\(f,s) -> f) $ filter isFile l - isFile (f, HVFSStatEncap s) = - vIsRegularFile s || vIsSymbolicLink s |