diff options
Diffstat (limited to 'src/Hakyll/Core/Util/File.hs')
-rw-r--r-- | src/Hakyll/Core/Util/File.hs | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/src/Hakyll/Core/Util/File.hs b/src/Hakyll/Core/Util/File.hs index 85fbd76..6d6b5c2 100644 --- a/src/Hakyll/Core/Util/File.hs +++ b/src/Hakyll/Core/Util/File.hs @@ -3,23 +3,15 @@ module Hakyll.Core.Util.File ( makeDirectories , getRecursiveContents - , isFileInternal ) where -------------------------------------------------------------------------------- -import Control.Applicative ((<$>)) -import Control.Monad (forM) -import Data.List (isPrefixOf) -import System.Directory (createDirectoryIfMissing, - doesDirectoryExist, - getDirectoryContents) -import System.FilePath (dropTrailingPathSeparator, - splitPath, takeDirectory, (</>)) - - --------------------------------------------------------------------------------- -import Hakyll.Core.Configuration +import Control.Applicative ((<$>)) +import Control.Monad (forM) +import System.Directory (createDirectoryIfMissing, + doesDirectoryExist, getDirectoryContents) +import System.FilePath (takeDirectory, (</>)) -------------------------------------------------------------------------------- @@ -50,18 +42,3 @@ getRecursiveContents top = go "" else return [rel] return $ concat paths - - --------------------------------------------------------------------------------- --- | Check if a file is meant for Hakyll internal use, i.e. if it is located in --- the destination or store directory -isFileInternal :: Configuration -- ^ Configuration - -> FilePath -- ^ File to check - -> Bool -- ^ If the given file is internal -isFileInternal configuration file = - any (`isPrefixOf` split file) dirs - where - split = map dropTrailingPathSeparator . splitPath - dirs = map (split . ($ configuration)) [ destinationDirectory - , storeDirectory - ] |