diff options
-rw-r--r-- | hakyll.cabal | 2 | ||||
-rw-r--r-- | src/Hakyll/Core/Util/File.hs | 31 |
2 files changed, 2 insertions, 31 deletions
diff --git a/hakyll.cabal b/hakyll.cabal index fc906b2..10a307a 100644 --- a/hakyll.cabal +++ b/hakyll.cabal @@ -1,5 +1,5 @@ Name: hakyll -Version: 3.4.2.1 +Version: 3.5.0.0 Synopsis: A static website compiler library Description: diff --git a/src/Hakyll/Core/Util/File.hs b/src/Hakyll/Core/Util/File.hs index 24814ae..06a4f78 100644 --- a/src/Hakyll/Core/Util/File.hs +++ b/src/Hakyll/Core/Util/File.hs @@ -3,16 +3,13 @@ module Hakyll.Core.Util.File ( makeDirectories , getRecursiveContents - , isFileObsolete , isFileInternal ) where import Control.Applicative ((<$>)) -import System.Time (ClockTime) -import Control.Monad (forM, filterM) +import Control.Monad (forM) import Data.List (isPrefixOf) import System.Directory ( createDirectoryIfMissing, doesDirectoryExist - , doesFileExist, getModificationTime , getDirectoryContents ) import System.FilePath ( normalise, takeDirectory, splitPath @@ -49,32 +46,6 @@ getRecursiveContents includeDirs topdir = do where isProper = (`notElem` [".", ".."]) --- | Check if a timestamp is obsolete compared to the timestamps of a number of --- files. When they are no files, it is never obsolete. --- -isObsolete :: ClockTime -- ^ The time to check. - -> [FilePath] -- ^ Dependencies of the cached file. - -> IO Bool -isObsolete _ [] = return False -isObsolete timeStamp depends = do - depends' <- filterM doesFileExist depends - dependsModified <- mapM getModificationTime depends' - return (timeStamp < maximum dependsModified) - --- | Check if a file is obsolete, given it's dependencies. When the file does --- not exist, it is always obsolete. Other wise, it is obsolete if any of it's --- dependencies has a more recent modification time than the file. --- -isFileObsolete :: FilePath -- ^ The cached file - -> [FilePath] -- ^ Dependencies of the cached file - -> IO Bool -isFileObsolete file depends = do - exists <- doesFileExist file - if not exists - then return True - else do timeStamp <- getModificationTime file - isObsolete timeStamp depends - -- | Check if a file is meant for Hakyll internal use, i.e. if it is located in -- the destination or store directory -- |