summaryrefslogtreecommitdiff
path: root/Logs/Unused.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-01-23 15:09:43 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-01-23 15:09:43 -0400
commitc860d9e9716510d257a6f348e1740ff1a4fa3a56 (patch)
tree9342e115f644e7711b40be5b2655ce715b856cda /Logs/Unused.hs
parentc071d676dce87ae6092100f6cde56faa6a462916 (diff)
add webapp UI to manage unused files
Diffstat (limited to 'Logs/Unused.hs')
-rw-r--r--Logs/Unused.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Logs/Unused.hs b/Logs/Unused.hs
index cdfcd2165..0af319f04 100644
--- a/Logs/Unused.hs
+++ b/Logs/Unused.hs
@@ -20,9 +20,10 @@ module Logs.Unused (
updateUnusedLog,
readUnusedLog,
readUnusedMap,
+ dateUnusedLog,
unusedKeys,
+ unusedKeys',
setUnusedKeys,
- unusedKeys'
) where
import qualified Data.Map as M
@@ -88,6 +89,11 @@ readUnusedLog prefix = do
readUnusedMap :: FilePath -> Annex UnusedMap
readUnusedMap = log2map <$$> readUnusedLog
+dateUnusedLog :: FilePath -> Annex (Maybe UTCTime)
+dateUnusedLog prefix = do
+ f <- fromRepo $ gitAnnexUnusedLog prefix
+ liftIO $ catchMaybeIO $ getModificationTime f
+
{- Set of unused keys. This is cached for speed. -}
unusedKeys :: Annex (S.Set Key)
unusedKeys = maybe (setUnusedKeys =<< unusedKeys') return