libarchive-0.2.0.0: src/Codec/Archive.hs
module Codec.Archive
( unpackToDir
, unpackTarball
) where
import Codec.Archive.Foreign (unpackToDir)
import qualified Data.ByteString as BS
unpackTarball :: FilePath -- ^ Filepath pointing to @.tar@ file
-> FilePath -- ^ Filepath to unpack to
-> IO ()
unpackTarball tarFp dirFp = do
contents <- BS.readFile tarFp
unpackToDir dirFp contents