packages feed

libarchive 0.2.0.0 → 0.2.1.0

raw patch · 7 files changed

+22/−14 lines, 7 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Codec.Archive: unpackTarball :: FilePath -> FilePath -> IO ()
+ Codec.Archive: unpackArchive :: FilePath -> FilePath -> IO ()

Files

CHANGELOG.md view
@@ -1,5 +1,11 @@ # libarchive +## 0.2.1.0++  * Enable autodetection of archive format/compression+  * Slightly improved docs+  * Rename `unpackTarball` to `unpackArchive`+ ## 0.2.0.0    * Fix bug in paths
LICENSE view
@@ -1,4 +1,4 @@-Copyright Vanessa McHale (c) 2018+Copyright Vanessa McHale (c) 2018-2019  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 
README.md view
@@ -6,6 +6,7 @@  This contains partial Haskell bindings around [libarchive](http://libarchive.org/). It was created as an alternative to-[tar](http://hackage.haskell.org/package/tar).+[tar](http://hackage.haskell.org/package/tar), but it supports more archive+formats. -Right now it only has support for decompressing tar archives.+Right now it only has support for decompressing archives.
cbits/unpack.c view
@@ -11,8 +11,8 @@     struct archive_entry *entry;     a = archive_read_new(); -    // enable tar support-    archive_read_support_format_tar(a);+    // autodetect archive format/compression+    archive_read_support_format_all(a);      // open from memory (bytestring)     archive_read_open_memory(a, buff, size);
libarchive.cabal view
@@ -1,15 +1,15 @@ cabal-version: 1.18 name: libarchive-version: 0.2.0.0+version: 0.2.1.0 license: BSD3 license-file: LICENSE-copyright: Copyright: (c) 2018 Vanessa McHale+copyright: Copyright: (c) 2018-2019 Vanessa McHale maintainer: vanessa.mchale@iohk.io author: Vanessa McHale bug-reports: https://github.com/vmchale/libarchive/issues-synopsis: Haskell bindings for libarchive+synopsis: Haskell interface to libarchive description:-    Partial Haskell bindings for [libarchive](https://www.libarchive.org/). Provides the ability to unpack tar archives.+    Partial Haskell bindings for [libarchive](https://www.libarchive.org/). Provides the ability to unpack archives. category: Codec build-type: Simple extra-source-files:
src/Codec/Archive.hs view
@@ -1,14 +1,14 @@ module Codec.Archive     ( unpackToDir-    , unpackTarball+    , unpackArchive     ) where  import           Codec.Archive.Foreign (unpackToDir) import qualified Data.ByteString       as BS -unpackTarball :: FilePath -- ^ Filepath pointing to @.tar@ file+unpackArchive :: FilePath -- ^ Filepath pointing to archive               -> FilePath -- ^ Filepath to unpack to               -> IO ()-unpackTarball tarFp dirFp = do+unpackArchive tarFp dirFp = do     contents <- BS.readFile tarFp     unpackToDir dirFp contents
src/Codec/Archive/Foreign.hs view
@@ -1,5 +1,6 @@ module Codec.Archive.Foreign ( unpackToDir                              ) where+ import           Data.ByteString  as BS import           Data.Word        (Word) import           Foreign.C.String@@ -9,8 +10,8 @@  foreign import ccall unsafe unpack_in_dir :: CString -> Ptr CChar -> Word -> IO () -unpackToDir :: FilePath-            -> BS.ByteString+unpackToDir :: FilePath -- ^ Directory to unpack in+            -> BS.ByteString -- ^ 'ByteString' containing archive             -> IO () unpackToDir fp bs = do     fp' <- newCString (fp ++ [pathSeparator])