Distribution.Client.Tar

cabal-install-3.12.1.0: The command-line interface for Cabal and Hackage.

Copyright | (c) 2007 Bjorn Bringert 2008 Andrea Vezzosi 2008-2009 Duncan Coutts
License | BSD3
Maintainer | duncan@community.haskell.org
Portability | portable
Safe Haskell | None
Language | Haskell2010

Distribution.Client.Tar

Contents

- `tar.gz` operations
- Other local utils

Description

Reading, writing and manipulating "`.tar`" archive files.

Synopsis

- createTarGzFile :: FilePath -> FilePath -> FilePath -> IO ()
- extractTarGzFile :: FilePath -> FilePath -> FilePath -> IO ()
- buildTreeRefTypeCode :: TypeCode
- buildTreeSnapshotTypeCode :: TypeCode
- isBuildTreeRefTypeCode :: TypeCode -> Bool
- filterEntries :: (Entry -> Bool) -> Entries e -> Entries e
- filterEntriesM :: Monad m => (Entry -> m Bool) -> Entries e -> m (Entries e)
- entriesToList :: Exception e => Entries e -> [Entry]

# `tar.gz` operations

createTarGzFile #

Arguments

:: FilePath | Full Tarball path
-> FilePath | Base directory
-> FilePath | Directory to archive, relative to base dir
-> IO () |

extractTarGzFile #

Arguments

:: FilePath | Destination directory
-> FilePath | Expected subdir (to check for tarbombs)
-> FilePath | Tarball
-> IO () |

# Other local utils

buildTreeRefTypeCode :: TypeCode #

Type code for the local build tree reference entry type. We don't use the symbolic link entry type because it allows only 100 ASCII characters for the path.

buildTreeSnapshotTypeCode :: TypeCode #

Type code for the local build tree snapshot entry type.

isBuildTreeRefTypeCode :: TypeCode -> Bool #

Is this a type code for a build tree reference?

filterEntries :: (Entry -> Bool) -> Entries e -> Entries e #

filterEntriesM :: Monad m => (Entry -> m Bool) -> Entries e -> m (Entries e) #

entriesToList :: Exception e => Entries e -> [Entry] #