X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Rakka%2FStorage%2FImpl.hs;h=3b48f0c10150c50c5550664cd5d9c47df81669ed;hb=23977989ef4be7316b1c2c3f709ca1e8e6bb7f84;hp=2073155c039436d0c5c74eee1197913902e6729e;hpb=443af4d3304139bb2187a0c726327b9c05829810;p=Rakka.git diff --git a/Rakka/Storage/Impl.hs b/Rakka/Storage/Impl.hs index 2073155..3b48f0c 100644 --- a/Rakka/Storage/Impl.hs +++ b/Rakka/Storage/Impl.hs @@ -2,6 +2,7 @@ module Rakka.Storage.Impl ( getPage' , putPage' , deletePage' + , getDirContents' , startIndexManager ) where @@ -63,6 +64,13 @@ findChangedPages repos oldRev newRev return . S.unions +getDirContents' :: Repository -> PageName -> Maybe RevNum -> IO [PageName] +getDirContents' repos name rev + = do reposPages <- getDirContentsInRevision repos name rev + defaultPages <- getDefaultDirContents name + return $ S.toList (reposPages `S.union` defaultPages) + + getCurrentRevNum :: Repository -> IO RevNum getCurrentRevNum repos = getRepositoryFS repos >>= getYoungestRev @@ -123,6 +131,7 @@ openIndex indexDir revFile $ removeFile revFile Right index <- openDatabase indexDir (Writer [Create []]) + addAttrIndex index "@type" StrIndex addAttrIndex index "@uri" SeqIndex addAttrIndex index "rakka:revision" SeqIndex noticeM logger ("Created an H.E. index on " ++ indexDir)