diff options
Diffstat (limited to 'src/Hakyll/Core/ResourceProvider/FileResourceProvider.hs')
-rw-r--r-- | src/Hakyll/Core/ResourceProvider/FileResourceProvider.hs | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/Hakyll/Core/ResourceProvider/FileResourceProvider.hs b/src/Hakyll/Core/ResourceProvider/FileResourceProvider.hs index b682634..442ae9a 100644 --- a/src/Hakyll/Core/ResourceProvider/FileResourceProvider.hs +++ b/src/Hakyll/Core/ResourceProvider/FileResourceProvider.hs @@ -5,13 +5,10 @@ module Hakyll.Core.ResourceProvider.FileResourceProvider ) where import Control.Applicative ((<$>)) -import Control.Monad (forM) - -import System.Directory (doesDirectoryExist, getDirectoryContents) -import System.FilePath ((</>), normalise) import Hakyll.Core.ResourceProvider import Hakyll.Core.Identifier +import Hakyll.Core.Util.File -- | Create a filesystem-based 'ResourceProvider' -- @@ -22,23 +19,3 @@ fileResourceProvider = do { resourceList = list , resourceString = readFile . toFilePath } - --- | Get all contents of a directory. Note that files starting with a dot (.) --- will be ignored. --- -getRecursiveContents :: FilePath -> IO [FilePath] -getRecursiveContents topdir = do - topdirExists <- doesDirectoryExist topdir - if topdirExists - then do names <- getDirectoryContents topdir - let properNames = filter isProper names - paths <- forM properNames $ \name -> do - let path = topdir </> name - isDirectory <- doesDirectoryExist path - if isDirectory - then getRecursiveContents path - else return [normalise path] - return (concat paths) - else return [] - where - isProper = not . (== '.') . head |