有人可以使用Codec.Archive.Zip中的packDirRecur向我展示一个示例

时间:2018-05-28 09:54:33

标签: haskell zip

main :: IO ()
main = do
    createArchive (Path "outPath.zip") (packDirRecur Store mkEntrySelector   (Path "/home/Documents/test"))

使用此代码会出现以下错误:

src/Main.hs:39:60:
Couldn't match type ‘Path.Abs’ with ‘Path.Rel’
Expected type: Path Path.Abs Path.File -> ZipArchive EntrySelector
  Actual type: Path Path.Rel Path.File -> ZipArchive EntrySelector
In the second argument of ‘packDirRecur’, namely ‘mkEntrySelector’
In the second argument of ‘createArchive’, namely
  ‘(packDirRecur
      Store mkEntrySelector (Path "/home/Documents/test"))’

如何让mkEntrySelector生成绝对路径?

0 个答案:

没有答案