-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell interface to libarchive -- -- Haskell bindings for libarchive. Provides the ability to unpack -- archives, including the ability to unpack archives lazily. @package libarchive @version 3.0.2.2 module Codec.Archive.Internal.Pack.Common mkEntry :: FilePath -> IO (Entry FilePath ByteString) mkContent :: FilePath -> FileStatus -> IO (EntryContent FilePath ByteString) module Codec.Archive.Internal.Monad handle :: IO ArchiveResult -> ArchiveM () ignore :: IO ArchiveResult -> ArchiveM () lenient :: IO ArchiveResult -> ArchiveM () runArchiveM :: ArchiveM a -> IO (Either ArchiveResult a) -- | Throws ArchiveResult on error. throwArchiveM :: ArchiveM a -> IO a withCStringArchiveM :: String -> (CString -> ExceptT a IO b) -> ExceptT a IO b useAsCStringLenArchiveM :: ByteString -> (CStringLen -> ExceptT a IO b) -> ExceptT a IO b allocaBytesArchiveM :: Int -> (Ptr a -> ExceptT b IO c) -> ExceptT b IO c type ArchiveM = ExceptT ArchiveResult IO -- | This module corresponds to archive.h -- -- Functions in this module are stateful and hence take place in the -- IO monad. module Codec.Archive.Foreign.Archive archiveReadHasEncryptedEntries :: ArchivePtr -> IO ArchiveEncryption archiveVersionNumber :: CInt archiveVersionString :: String archiveVersionDetails :: String archiveZlibVersion :: IO CString archiveLiblzmaVersion :: IO CString archiveBzlibVersion :: IO CString archiveLiblz4Version :: IO CString archiveLibzstdVersion :: IO CString archiveErrorString :: ArchivePtr -> IO CString archiveFormatName :: ArchivePtr -> IO CString archiveFormat :: ArchivePtr -> IO ArchiveFormat archiveClearError :: ArchivePtr -> IO () archiveSetError :: ArchivePtr -> CInt -> CString -> IO () archiveCopyError :: ArchivePtr -> ArchivePtr -> IO () archiveFileCount :: ArchivePtr -> IO CInt archiveFilterCount :: ArchivePtr -> IO CInt archiveFilterBytes :: ArchivePtr -> CInt -> IO LaInt64 archiveFilterCode :: ArchivePtr -> CInt -> IO Int archiveFilterName :: ArchivePtr -> CInt -> IO CString archiveReadData :: ArchivePtr -> Ptr a -> CSize -> IO LaSSize archiveReadNew :: IO (Ptr Archive) archiveReadSetOpenCallback :: ArchivePtr -> FunPtr (ArchiveOpenCallbackRaw a) -> IO ArchiveResult archiveReadSetSeekCallback :: ArchivePtr -> FunPtr (ArchiveSeekCallback a) -> IO ArchiveResult archiveReadSetSkipCallback :: ArchivePtr -> FunPtr (ArchiveSeekCallback a) -> IO ArchiveResult archiveReadSetSwitchCallback :: ArchivePtr -> FunPtr (ArchiveSwitchCallbackRaw a n) -> IO ArchiveResult archiveReadSetCallbackData2 :: ArchivePtr -> Ptr a -> CUInt -> IO ArchiveResult archiveReadAddCallbackData :: ArchivePtr -> Ptr a -> CUInt -> IO ArchiveResult archiveReadAppendCallbackData :: ArchivePtr -> Ptr a -> IO ArchiveResult archiveReadPrependCallbackData :: ArchivePtr -> Ptr a -> IO ArchiveResult archiveReadSetReadCallback :: ArchivePtr -> FunPtr (ArchiveReadCallback a b) -> IO ArchiveResult archiveReadSetCloseCallback :: ArchivePtr -> FunPtr (ArchiveCloseCallbackRaw a) -> IO ArchiveResult archiveReadSetCallbackData :: ArchivePtr -> Ptr a -> IO ArchiveResult archiveReadSetFormat :: ArchivePtr -> ArchiveFormat -> IO ArchiveResult archiveReadOpen :: ArchivePtr -> Ptr a -> FunPtr (ArchiveOpenCallbackRaw a) -> FunPtr (ArchiveReadCallback a b) -> FunPtr (ArchiveCloseCallbackRaw a) -> IO ArchiveResult archiveReadOpenFilename :: ArchivePtr -> CString -> CSize -> IO ArchiveResult archiveReadOpenFilenameW :: ArchivePtr -> CWString -> CSize -> IO ArchiveResult archiveReadOpenFilenames :: ArchivePtr -> Ptr CString -> CSize -> IO ArchiveResult archiveReadOpenMemory :: ArchivePtr -> Ptr a -> CSize -> IO ArchiveResult archiveReadOpen1 :: ArchivePtr -> IO ArchiveResult archiveReadOpen2 :: ArchivePtr -> Ptr a -> FunPtr (ArchiveOpenCallbackRaw a) -> FunPtr (ArchiveReadCallback a b) -> FunPtr (ArchiveSkipCallback a) -> FunPtr (ArchiveCloseCallbackRaw a) -> IO ArchiveResult archiveReadOpenFd :: ArchivePtr -> Fd -> CSize -> IO ArchiveResult archiveReadOpenFILE :: ArchivePtr -> FilePtr -> IO ArchiveResult archiveReadNextHeader :: ArchivePtr -> IO (ArchiveResult, Ptr ArchiveEntry) archiveReadNextHeader2 :: ArchivePtr -> ArchiveEntryPtr -> IO ArchiveResult archiveReadHeaderPosition :: ArchivePtr -> IO LaInt64 archiveReadFormatCapabilities :: ArchivePtr -> IO ArchiveCapabilities archiveSeekData :: ArchivePtr -> LaInt64 -> CInt -> IO LaInt64 archiveReadDataBlock :: ArchivePtr -> Ptr (Ptr a) -> Ptr CSize -> Ptr LaInt64 -> IO ArchiveResult archiveReadDataIntoFd :: ArchivePtr -> Fd -> IO ArchiveResult archiveReadSetFormatOption :: ArchivePtr -> CString -> CString -> CString -> IO ArchiveResult archiveReadSetFilterOption :: ArchivePtr -> CString -> CString -> CString -> IO ArchiveResult archiveReadSetOption :: ArchivePtr -> CString -> CString -> CString -> IO ArchiveResult archiveReadSetOptions :: ArchivePtr -> CString -> IO ArchiveResult archiveReadAddPassphrase :: ArchivePtr -> CString -> IO ArchiveResult archiveReadSetPassphraseCallback :: ArchivePtr -> Ptr a -> FunPtr (ArchivePassphraseCallback a) -> IO ArchiveResult archiveReadExtract :: ArchivePtr -> ArchiveEntryPtr -> Flags -> IO ArchiveResult archiveReadExtract2 :: ArchivePtr -> ArchiveEntryPtr -> ArchivePtr -> IO ArchiveResult archiveReadExtractSetProgressCallback :: ArchivePtr -> FunPtr (Ptr a -> IO ()) -> Ptr a -> IO () archiveReadExtractSetSkipFile :: ArchivePtr -> LaInt64 -> LaInt64 -> IO () archiveReadClose :: ArchivePtr -> IO ArchiveResult archiveReadFree :: ArchivePtr -> IO ArchiveResult archiveReadSupportFilterAll :: ArchivePtr -> IO ArchiveResult archiveReadSupportFilterByCode :: ArchivePtr -> CInt -> IO ArchiveResult archiveReadSupportFilterBzip2 :: ArchivePtr -> IO ArchiveResult archiveReadSupportFilterCompress :: ArchivePtr -> IO ArchiveResult archiveReadSupportFilterGzip :: ArchivePtr -> IO ArchiveResult archiveReadSupportFilterGrzip :: ArchivePtr -> IO ArchiveResult archiveReadSupportFilterLrzip :: ArchivePtr -> IO ArchiveResult archiveReadSupportFilterLz4 :: ArchivePtr -> IO ArchiveResult archiveReadSupportFilterLzip :: ArchivePtr -> IO ArchiveResult archiveReadSupportFilterLzma :: ArchivePtr -> IO ArchiveResult archiveReadSupportFilterLzop :: ArchivePtr -> IO ArchiveResult archiveReadSupportFilterNone :: ArchivePtr -> IO ArchiveResult archiveReadSupportFilterProgram :: ArchivePtr -> CString -> IO ArchiveResult archiveReadSupportFilterProgramSignature :: ArchivePtr -> CString -> Ptr a -> CSize -> IO ArchiveResult archiveReadSupportFilterRpm :: ArchivePtr -> IO ArchiveResult archiveReadSupportFilterUu :: ArchivePtr -> IO ArchiveResult archiveReadSupportFilterXz :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatAll :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormat7zip :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatAr :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatByCode :: ArchivePtr -> CInt -> IO ArchiveResult archiveReadSupportFormatCab :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatCpio :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatEmpty :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatGnutar :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatIso9660 :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatLha :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatMtree :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatRar :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatRar5 :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatRaw :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatTar :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatWarc :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatXar :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatZip :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatZipStreamable :: ArchivePtr -> IO ArchiveResult archiveReadSupportFormatZipSeekable :: ArchivePtr -> IO ArchiveResult archiveReadAppendFilter :: ArchivePtr -> CInt -> IO ArchiveResult archiveReadAppendFilterProgram :: ArchivePtr -> CString -> IO ArchiveResult archiveReadAppendFilterProgramSignature :: ArchivePtr -> CString -> Ptr a -> CSize -> IO ArchiveResult archiveWriteOpenMemory :: ArchivePtr -> Ptr a -> CSize -> IO (ArchiveResult, CSize) archiveWriteNew :: IO (Ptr Archive) archiveWriteData :: ArchivePtr -> Ptr a -> CSize -> IO LaSSize archiveWriteOpen :: ArchivePtr -> Ptr a -> FunPtr (ArchiveOpenCallbackRaw a) -> FunPtr (ArchiveWriteCallback a b) -> FunPtr (ArchiveCloseCallbackRaw a) -> IO ArchiveResult archiveWriteClose :: ArchivePtr -> IO ArchiveResult archiveWriteHeader :: ArchivePtr -> ArchiveEntryPtr -> IO ArchiveResult archiveWriteSetBytesPerBlock :: ArchivePtr -> CInt -> IO ArchiveResult archiveWriteGetBytesPerBlock :: ArchivePtr -> IO CInt archiveWriteSetBytesInLastBlock :: ArchivePtr -> CInt -> IO ArchiveResult archiveWriteGetBytesInLastBlock :: ArchivePtr -> IO CInt archiveWriteSetSkipFile :: ArchivePtr -> LaInt64 -> LaInt64 -> IO ArchiveResult archiveWriteAddFilter :: ArchivePtr -> ArchiveFilter -> IO ArchiveResult archiveWriteAddFilterByName :: ArchivePtr -> CString -> IO ArchiveResult archiveWriteAddFilterB64encode :: ArchivePtr -> IO ArchiveResult archiveWriteAddFilterBzip2 :: ArchivePtr -> IO ArchiveResult archiveWriteAddFilterCompress :: ArchivePtr -> IO ArchiveResult archiveWriteAddFilterGrzip :: ArchivePtr -> IO ArchiveResult archiveWriteAddFilterLrzip :: ArchivePtr -> IO ArchiveResult archiveWriteAddFilterLz4 :: ArchivePtr -> IO ArchiveResult archiveWriteAddFilterLzma :: ArchivePtr -> IO ArchiveResult archiveWriteAddFilterLzip :: ArchivePtr -> IO ArchiveResult archiveWriteAddFilterLzop :: ArchivePtr -> IO ArchiveResult archiveWriteAddFilterNone :: ArchivePtr -> IO ArchiveResult archiveWriteAddFilterProgram :: ArchivePtr -> CString -> IO ArchiveResult archiveWriteAddFilterUuencode :: ArchivePtr -> IO ArchiveResult archiveWriteAddFilterXz :: ArchivePtr -> IO ArchiveResult archiveWriteAddFilterZstd :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormat :: ArchivePtr -> ArchiveFormat -> IO ArchiveResult archiveWriteSetFormatByName :: ArchivePtr -> CString -> IO ArchiveResult archiveWriteSetFormatArBsd :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatArSvr4 :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatCpio :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatCpioNewc :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatGnutar :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatMtree :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatMtreeClassic :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatPax :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatPaxRestricted :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatZip :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormat7zip :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatRaw :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatShar :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatSharDump :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatUstar :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatV7tar :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatWarc :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatXar :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatFilterByExt :: ArchivePtr -> CString -> IO ArchiveResult archiveWriteSetFormatFilterByExtDef :: ArchivePtr -> CString -> CString -> IO ArchiveResult archiveWriteZipSetCompressionDeflate :: ArchivePtr -> IO ArchiveResult archiveWriteZipSetCompressionStore :: ArchivePtr -> IO ArchiveResult archiveWriteOpen2 :: ArchivePtr -> Ptr a -> FunPtr (ArchiveOpenCallbackRaw a) -> FunPtr (ArchiveWriteCallback a b) -> FunPtr (ArchiveCloseCallbackRaw a) -> FunPtr (ArchiveFreeCallbackRaw a) -> IO ArchiveResult archiveWriteOpenFd :: ArchivePtr -> Fd -> IO ArchiveResult archiveWriteOpenFilenameW :: ArchivePtr -> CWString -> IO ArchiveResult archiveWriteOpenFilename :: ArchivePtr -> CString -> IO ArchiveResult archiveWriteOpenFILE :: ArchivePtr -> FilePtr -> IO ArchiveResult archiveWriteDataBlock :: ArchivePtr -> Ptr a -> CSize -> LaInt64 -> IO LaSSize archiveWriteFinishEntry :: ArchivePtr -> IO ArchiveResult archiveWriteFail :: ArchivePtr -> IO ArchiveResult archiveWriteFree :: ArchivePtr -> IO ArchiveResult archiveWriteSetFormatOption :: ArchivePtr -> CString -> CString -> CString -> IO ArchiveResult archiveWriteSetFilterOption :: ArchivePtr -> CString -> CString -> CString -> IO ArchiveResult archiveWriteSetOption :: ArchivePtr -> CString -> CString -> CString -> IO ArchiveResult archiveWriteSetOptions :: ArchivePtr -> CString -> IO ArchiveResult archiveWriteSetPassphrase :: ArchivePtr -> CString -> IO ArchiveResult archiveWriteSetPassphraseCallback :: ArchivePtr -> Ptr a -> FunPtr (ArchivePassphraseCallback a) -> IO ArchiveResult archiveWriteDiskSetOptions :: ArchivePtr -> Flags -> IO ArchiveResult archiveWriteDiskNew :: IO (Ptr Archive) archiveWriteDiskSetSkipFile :: ArchivePtr -> LaInt64 -> LaInt64 -> IO ArchiveResult archiveWriteDiskSetStandardLookup :: ArchivePtr -> IO ArchiveResult archiveWriteDiskSetGroupLookup :: ArchivePtr -> Ptr a -> FunPtr (Ptr a -> CString -> LaInt64 -> IO LaInt64) -> FunPtr (Ptr a -> IO ()) -> IO ArchiveResult archiveWriteDiskSetUserLookup :: ArchivePtr -> Ptr a -> FunPtr (Ptr a -> CString -> LaInt64 -> IO LaInt64) -> FunPtr (Ptr a -> IO ()) -> IO ArchiveResult archiveWriteDiskGid :: ArchivePtr -> CString -> LaInt64 -> IO LaInt64 archiveWriteDiskUid :: ArchivePtr -> CString -> LaInt64 -> IO LaInt64 archiveReadDiskNew :: IO (Ptr Archive) archiveReadDiskSetSymlinkLogical :: ArchivePtr -> IO ArchiveResult archiveReadDiskSetSymlinkPhysical :: ArchivePtr -> IO ArchiveResult archiveReadDiskSetSymlinkHybrid :: ArchivePtr -> IO ArchiveResult archiveReadDiskEntryFromFile :: ArchivePtr -> ArchiveEntryPtr -> Fd -> StatPtr -> IO ArchiveResult archiveReadDiskGname :: ArchivePtr -> LaInt64 -> IO CString archiveReadDiskUname :: ArchivePtr -> LaInt64 -> IO CString archiveReadDiskSetStandardLookup :: ArchivePtr -> IO ArchiveResult archiveReadDiskSetGnameLookup :: ArchivePtr -> Ptr a -> FunPtr (Ptr a -> LaInt64 -> IO CString) -> FunPtr (Ptr a -> IO ()) -> IO ArchiveResult archiveReadDiskSetUnameLookup :: ArchivePtr -> Ptr a -> FunPtr (Ptr a -> LaInt64 -> IO CString) -> FunPtr (Ptr a -> IO ()) -> IO ArchiveResult archiveReadDiskOpen :: ArchivePtr -> CString -> IO ArchiveResult archiveReadDiskOpenW :: ArchivePtr -> CWString -> IO ArchiveResult archiveReadDiskDescend :: ArchivePtr -> IO ArchiveResult archiveReadDiskCanDescend :: ArchivePtr -> IO Bool archiveReadDiskCurrentFilesystem :: ArchivePtr -> IO CInt archiveReadDiskCurrentFilesystemIsSynthetic :: ArchivePtr -> IO Bool archiveReadDiskCurrentFilesystemIsRemote :: ArchivePtr -> IO Bool archiveReadDiskSetAtimeRestored :: ArchivePtr -> IO ArchiveResult archiveReadDiskSetBehavior :: ArchivePtr -> Flags -> IO ArchiveResult archiveReadDiskSetMatching :: ArchivePtr -> ArchivePtr -> FunPtr (ArchivePtr -> Ptr a -> ArchiveEntryPtr -> IO ()) -> Ptr a -> IO ArchiveResult archiveReadDiskSetMetadataFilterCallback :: ArchivePtr -> FunPtr (ArchivePtr -> Ptr a -> ArchiveEntry -> IO CInt) -> Ptr a -> IO ArchiveResult archiveReadDiskNoAcl :: ReadDiskFlags archiveReadDiskNoFFlags :: ReadDiskFlags archiveVersionNumberMacro :: Int archiveVersionOnlyString :: String archiveVersionStringMacro :: String archiveReadFormatCapsNone :: ArchiveCapabilities archiveReadFormatCapsEncryptData :: ArchiveCapabilities archiveReadFormatCapsEncryptMetadata :: ArchiveCapabilities archiveMatchMTime :: TimeFlag archiveMatchCTime :: TimeFlag archiveMatchNewer :: TimeFlag archiveMatchOlder :: TimeFlag archiveMatchEqual :: TimeFlag archiveExtractOwner :: Flags archiveExtractPerm :: Flags archiveExtractTime :: Flags archiveExtractNoOverwrite :: Flags archiveExtractUnlink :: Flags archiveExtractACL :: Flags archiveExtractFFlags :: Flags archiveExtractXattr :: Flags archiveExtractSecureSymlinks :: Flags archiveExtractSecureNoDotDot :: Flags archiveExtractNoAutodir :: Flags archiveExtractSparse :: Flags archiveExtractMacMetadata :: Flags archiveExtractNoHfsCompression :: Flags archiveExtractHfsCompressionForced :: Flags archiveExtractSecureNoAbsolutePaths :: Flags archiveExtractClearNoChangeFFlags :: Flags archiveExtractNoOverwriteNewer :: Flags archiveReadDiskRestoreATime :: ReadDiskFlags archiveReadDiskHonorNoDump :: ReadDiskFlags archiveReadDiskMacCopyFile :: ReadDiskFlags archiveReadDiskNoTraverseMounts :: ReadDiskFlags archiveReadDiskNoXattr :: ReadDiskFlags archiveFree :: Ptr Archive -> IO CInt archiveEntryFree :: FinalizerPtr () archiveMatchExcluded :: ArchivePtr -> ArchiveEntryPtr -> IO Bool archiveMatchPathExcluded :: ArchivePtr -> ArchiveEntryPtr -> IO Bool archiveMatchSetInclusionRecursion :: ArchivePtr -> Bool -> IO ArchiveResult archiveMatchExcludePattern :: ArchivePtr -> CString -> IO ArchiveResult archiveMatchExcludePatternW :: ArchivePtr -> CWString -> IO ArchiveResult archiveMatchIncludePattern :: ArchivePtr -> CString -> IO ArchiveResult archiveMatchIncludePatternW :: ArchivePtr -> CWString -> IO ArchiveResult archiveMatchExcludePatternFromFile :: ArchivePtr -> CString -> Bool -> IO ArchiveResult archiveMatchExcludePatternFromFileW :: ArchivePtr -> CWString -> Bool -> IO ArchiveResult archiveMatchIncludePatternFromFile :: ArchivePtr -> CString -> Bool -> IO ArchiveResult archiveMatchIncludePatternFromFileW :: ArchivePtr -> CWString -> Bool -> IO ArchiveResult archiveMatchPathUnmatchedInclusions :: ArchivePtr -> IO CInt archiveMatchPathUnmatchedInclusionsNext :: ArchivePtr -> IO (ArchiveResult, CString) archiveMatchPathUnmatchedInclusionsNextW :: ArchivePtr -> IO (ArchiveResult, CWString) archiveMatchIncludeTime :: ArchivePtr -> TimeFlag -> CTime -> CLong -> IO ArchiveResult archiveMatchIncludeDate :: ArchivePtr -> TimeFlag -> CString -> IO ArchiveResult archiveMatchIncludeDateW :: ArchivePtr -> TimeFlag -> CWString -> IO ArchiveResult archiveMatchIncludeFileTime :: ArchivePtr -> TimeFlag -> CString -> IO ArchiveResult archiveMatchIncludeFileTimeW :: ArchivePtr -> TimeFlag -> CWString -> IO ArchiveResult archiveMatchTimeExcluded :: ArchivePtr -> ArchiveEntryPtr -> IO Bool archiveMatchOwnerExcluded :: ArchivePtr -> ArchiveEntryPtr -> IO Bool archiveMatchExcludeEntry :: ArchivePtr -> TimeFlag -> ArchiveEntryPtr -> IO ArchiveResult archiveReadDataSkip :: ArchivePtr -> IO ArchiveResult archiveMatchIncludeGname :: ArchivePtr -> CString -> IO ArchiveResult archiveMatchIncludeGnameW :: ArchivePtr -> CWString -> IO ArchiveResult archiveMatchIncludeUname :: ArchivePtr -> CString -> IO ArchiveResult archiveMatchIncludeUnameW :: ArchivePtr -> CWString -> IO ArchiveResult archiveMatchIncludeUid :: ArchivePtr -> Id -> IO ArchiveResult archiveMatchIncludeGid :: ArchivePtr -> Id -> IO ArchiveResult archiveErrno :: ArchivePtr -> IO ArchiveResult -- | Abstract type data Archive data ArchiveEncryption HasEncryption :: ArchiveEncryption NoEncryption :: ArchiveEncryption EncryptionUnsupported :: ArchiveEncryption EncryptionUnknown :: ArchiveEncryption -- | FILE* in C newtype FilePtr FilePtr :: Ptr FilePtr -> FilePtr data ArchiveFilter ArchiveFilterNone :: ArchiveFilter ArchiveFilterGzip :: ArchiveFilter ArchiveFilterBzip2 :: ArchiveFilter ArchiveFilterCompress :: ArchiveFilter ArchiveFilterProgram :: ArchiveFilter ArchiveFilterLzma :: ArchiveFilter ArchiveFilterXz :: ArchiveFilter ArchiveFilterUu :: ArchiveFilter ArchiveFilterRpm :: ArchiveFilter ArchiveFilterLzip :: ArchiveFilter ArchiveFilterLrzip :: ArchiveFilter ArchiveFilterLzop :: ArchiveFilter ArchiveFilterGrzip :: ArchiveFilter ArchiveFilterLz4 :: ArchiveFilter ArchiveFilterZstd :: ArchiveFilter data ArchiveFormat ArchiveFormatCpio :: ArchiveFormat ArchiveFormatCpioPosix :: ArchiveFormat ArchiveFormatCpioBinLe :: ArchiveFormat ArchiveFormatCpioBinBe :: ArchiveFormat ArchiveFormatCpioSvr4Nocrc :: ArchiveFormat ArchiveFormatCpioSvr4Crc :: ArchiveFormat ArchiveFormatCpioAfioLarge :: ArchiveFormat ArchiveFormatShar :: ArchiveFormat ArchiveFormatSharBase :: ArchiveFormat ArchiveFormatSharDump :: ArchiveFormat ArchiveFormatTar :: ArchiveFormat ArchiveFormatTarUstar :: ArchiveFormat ArchiveFormatTarPaxInterchange :: ArchiveFormat ArchiveFormatTarPaxRestricted :: ArchiveFormat ArchiveFormatTarGnutar :: ArchiveFormat ArchiveFormatIso9660 :: ArchiveFormat ArchiveFormatIso9660Rockridge :: ArchiveFormat ArchiveFormatZip :: ArchiveFormat ArchiveFormatEmpty :: ArchiveFormat ArchiveFormatAr :: ArchiveFormat ArchiveFormatArGnu :: ArchiveFormat ArchiveFormatArBsd :: ArchiveFormat ArchiveFormatMtree :: ArchiveFormat ArchiveFormatRaw :: ArchiveFormat ArchiveFormatXar :: ArchiveFormat ArchiveFormatLha :: ArchiveFormat ArchiveFormatCab :: ArchiveFormat ArchiveFormatRar :: ArchiveFormat ArchiveFormat7zip :: ArchiveFormat ArchiveFormatWarc :: ArchiveFormat ArchiveFormatRarV5 :: ArchiveFormat data Flags data ArchiveCapabilities data ReadDiskFlags data TimeFlag type ArchiveReadCallback a b = Ptr Archive -> Ptr a -> Ptr (Ptr b) -> IO LaSSize type ArchiveSkipCallback a = Ptr Archive -> Ptr a -> LaInt64 -> IO LaInt64 type ArchiveSeekCallback a = Ptr Archive -> Ptr a -> LaInt64 -> CInt -> IO LaInt64 type ArchiveWriteCallback a b = Ptr Archive -> Ptr a -> Ptr b -> CSize -> IO LaSSize type ArchiveOpenCallback a = Ptr Archive -> Ptr a -> IO ArchiveResult type ArchiveCloseCallback a = Ptr Archive -> Ptr a -> IO ArchiveResult type ArchiveSwitchCallback a b = Ptr Archive -> Ptr a -> Ptr b -> IO ArchiveResult type ArchiveOpenCallbackRaw a = Ptr Archive -> Ptr a -> IO CInt type ArchiveCloseCallbackRaw a = Ptr Archive -> Ptr a -> IO CInt type ArchiveSwitchCallbackRaw a b = Ptr Archive -> Ptr a -> Ptr b -> IO CInt type ArchivePassphraseCallback a = Ptr Archive -> Ptr a -> IO CString type ArchiveFreeCallback a = Ptr Archive -> Ptr a -> IO ArchiveResult -- | Don't use an open callback. This is the recommended argument to -- archiveReadOpen noOpenCallback :: FunPtr (ArchiveOpenCallbackRaw a) mkReadCallback :: ArchiveReadCallback a b -> IO (FunPtr (ArchiveReadCallback a b)) mkSkipCallback :: ArchiveSkipCallback a -> IO (FunPtr (ArchiveSkipCallback a)) mkSeekCallback :: ArchiveSeekCallback a -> IO (FunPtr (ArchiveSeekCallback a)) mkWriteCallback :: ArchiveWriteCallback a b -> IO (FunPtr (ArchiveWriteCallback a b)) mkPassphraseCallback :: ArchivePassphraseCallback a -> IO (FunPtr (ArchivePassphraseCallback a)) mkOpenCallback :: ArchiveOpenCallback a -> IO (FunPtr (ArchiveOpenCallbackRaw a)) mkCloseCallback :: ArchiveCloseCallback a -> IO (FunPtr (ArchiveCloseCallbackRaw a)) mkSwitchCallback :: ArchiveSwitchCallback a b -> IO (FunPtr (ArchiveSwitchCallbackRaw a b)) mkFreeCallback :: ArchiveFreeCallback a -> IO (FunPtr (ArchiveFreeCallbackRaw a)) mkWriteLookup :: (Ptr a -> CString -> LaInt64 -> IO LaInt64) -> IO (FunPtr (Ptr a -> CString -> LaInt64 -> IO LaInt64)) -- | Also for archiveReadDiskSetGnameLookup and -- archiveReadDiskSetUnameLookup mkReadLookup :: (Ptr a -> LaInt64 -> IO CString) -> IO (FunPtr (Ptr a -> LaInt64 -> IO CString)) -- | Can also be used with archiveReadExtractSetProgressCallback mkCleanup :: (Ptr a -> IO ()) -> IO (FunPtr (Ptr a -> IO ())) mkMatch :: (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO ()) -> IO (FunPtr (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO ())) mkFilter :: (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO Bool) -> IO (FunPtr (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO CInt)) mkExcludedCallback :: (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO ()) -> IO (FunPtr (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO ())) type ArchiveEntryPtr = ForeignPtr (ArchiveEntry) type ArchivePtr = ForeignPtr (Archive) type StatPtr = Ptr (Stat) type LaInt64 = (CLong) type LaSSize = (CLong) -- | This module corresponds to archive_entry.h -- -- Functions in this module are stateful and hence take place in the -- IO monad. module Codec.Archive.Foreign.ArchiveEntry archiveEntryClear :: ArchiveEntryPtr -> IO ArchiveEntryPtr archiveEntryClone :: ArchiveEntryPtr -> IO ArchiveEntryPtr archiveEntryNew :: IO ArchiveEntryPtr archiveEntryFree :: FinalizerPtr () archiveEntryNew2 :: ArchivePtr -> IO ArchiveEntryPtr archiveEntryAtime :: ArchiveEntryPtr -> IO CTime archiveEntryAtimeNsec :: ArchiveEntryPtr -> IO CLong archiveEntryAtimeIsSet :: ArchiveEntryPtr -> IO Bool archiveEntryBirthtime :: ArchiveEntryPtr -> IO CTime archiveEntryBirthtimeNsec :: ArchiveEntryPtr -> IO CLong archiveEntryBirthtimeIsSet :: ArchiveEntryPtr -> IO Bool archiveEntryCtime :: ArchiveEntryPtr -> IO CTime archiveEntryCtimeNsec :: ArchiveEntryPtr -> IO CLong archiveEntryCtimeIsSet :: ArchiveEntryPtr -> IO Bool archiveEntryDev :: ArchiveEntryPtr -> IO CDev archiveEntryDevIsSet :: ArchiveEntryPtr -> IO Bool archiveEntryDevminor :: ArchiveEntryPtr -> IO CDev archiveEntryDevmajor :: ArchiveEntryPtr -> IO CDev archiveEntryFflags :: ArchiveEntryPtr -> CULong -> CULong -> IO () -- | Here a Nothing means a hardlink archiveEntryFflagsText :: ArchiveEntryPtr -> IO CString archiveEntryFiletype :: ArchiveEntryPtr -> IO (Maybe FileType) archiveEntryGid :: ArchiveEntryPtr -> IO LaInt64 archiveEntryGname :: ArchiveEntryPtr -> IO CString archiveEntryGnameUtf8 :: ArchiveEntryPtr -> IO CString archiveEntryGnameW :: ArchiveEntryPtr -> IO CWString archiveEntryHardlink :: ArchiveEntryPtr -> IO CString archiveEntryHardlinkUtf8 :: ArchiveEntryPtr -> IO CString archiveEntryHardlinkW :: ArchiveEntryPtr -> IO CWString archiveEntryIno :: ArchiveEntryPtr -> IO LaInt64 archiveEntryIno64 :: ArchiveEntryPtr -> IO LaInt64 archiveEntryInoIsSet :: ArchiveEntryPtr -> IO Bool archiveEntryMode :: ArchiveEntryPtr -> IO CMode archiveEntryMtime :: ArchiveEntryPtr -> IO CTime archiveEntryMtimeNsec :: ArchiveEntryPtr -> IO CLong archiveEntryMtimeIsSet :: ArchiveEntryPtr -> IO Bool archiveEntryNlink :: ArchiveEntryPtr -> IO CUInt archiveEntryPathname :: ArchiveEntryPtr -> IO CString archiveEntryPathnameUtf8 :: ArchiveEntryPtr -> IO CString archiveEntryPathnameW :: ArchiveEntryPtr -> IO CWString archiveEntryPerm :: ArchiveEntryPtr -> IO CMode archiveEntryRdev :: ArchiveEntryPtr -> IO CDev archiveEntryRdevmajor :: ArchiveEntryPtr -> IO CDev archiveEntryRdevminor :: ArchiveEntryPtr -> IO CDev archiveEntrySourcepath :: ArchiveEntryPtr -> IO CString archiveEntrySourcepathW :: ArchiveEntryPtr -> IO CWString archiveEntrySize :: ArchiveEntryPtr -> IO LaInt64 archiveEntrySizeIsSet :: ArchiveEntryPtr -> IO Bool archiveEntryStrmode :: ArchiveEntryPtr -> IO CString archiveEntrySymlink :: ArchiveEntryPtr -> IO CString archiveEntrySymlinkType :: ArchiveEntryPtr -> IO Symlink archiveEntrySymlinkW :: ArchiveEntryPtr -> IO CWString archiveEntrySymlinkUtf8 :: ArchiveEntryPtr -> IO CString archiveEntryUid :: ArchiveEntryPtr -> IO LaInt64 archiveEntryUname :: ArchiveEntryPtr -> IO CString archiveEntryUnameUtf8 :: ArchiveEntryPtr -> IO CString archiveEntryUnameW :: ArchiveEntryPtr -> IO CWString archiveEntryIsDataEncrypted :: ArchiveEntryPtr -> IO Bool archiveEntryIsMetadataEncrypted :: ArchiveEntryPtr -> IO Bool archiveEntryIsEncrypted :: ArchiveEntryPtr -> IO Bool archiveEntrySetAtime :: ArchiveEntryPtr -> CTime -> CLong -> IO () archiveEntryUnsetAtime :: ArchiveEntryPtr -> IO () archiveEntrySetBirthtime :: ArchiveEntryPtr -> CTime -> CLong -> IO () archiveEntryUnsetBirthtime :: ArchiveEntryPtr -> IO () archiveEntrySetCtime :: ArchiveEntryPtr -> CTime -> CLong -> IO () archiveEntryUnsetCtime :: ArchiveEntryPtr -> IO () archiveEntrySetDev :: ArchiveEntryPtr -> CDev -> IO () archiveEntrySetDevminor :: ArchiveEntryPtr -> CDev -> IO () archiveEntrySetDevmajor :: ArchiveEntryPtr -> CDev -> IO () archiveEntrySetFflags :: ArchiveEntryPtr -> CULong -> CULong -> IO () archiveEntryCopyFflagsText :: ArchiveEntryPtr -> CString -> IO CString -- | Here a Nothing means a hardlink archiveEntryCopyFflagsTextW :: ArchiveEntryPtr -> CWString -> IO CWString archiveEntrySetFiletype :: ArchiveEntryPtr -> Maybe FileType -> IO () archiveEntrySetGid :: ArchiveEntryPtr -> LaInt64 -> IO () archiveEntrySetGname :: ArchiveEntryPtr -> CString -> IO () archiveEntrySetGnameUtf8 :: ArchiveEntryPtr -> CString -> IO () archiveEntryCopyGname :: ArchiveEntryPtr -> CString -> IO () archiveEntryCopyGnameW :: ArchiveEntryPtr -> CWString -> IO () archiveEntryUpdateGnameUtf8 :: ArchiveEntryPtr -> CString -> IO Bool archiveEntrySetHardlink :: ArchiveEntryPtr -> CString -> IO () archiveEntrySetHardlinkUtf8 :: ArchiveEntryPtr -> CString -> IO () archiveEntryCopyHardlink :: ArchiveEntryPtr -> CString -> IO () archiveEntryCopyHardlinkW :: ArchiveEntryPtr -> CWString -> IO () archiveEntryUpdateHardlinkUtf8 :: ArchiveEntryPtr -> CString -> IO Bool archiveEntrySetIno :: ArchiveEntryPtr -> LaInt64 -> IO () archiveEntrySetIno64 :: ArchiveEntryPtr -> LaInt64 -> IO () archiveEntrySetLink :: ArchiveEntryPtr -> CString -> IO () archiveEntrySetLinkUtf8 :: ArchiveEntryPtr -> CString -> IO () archiveEntryCopyLink :: ArchiveEntryPtr -> CString -> IO () archiveEntryCopyLinkW :: ArchiveEntryPtr -> CWString -> IO () archiveEntryUpdateLinkUtf8 :: ArchiveEntryPtr -> CString -> IO Bool archiveEntrySetMode :: ArchiveEntryPtr -> CMode -> IO () archiveEntrySetMtime :: ArchiveEntryPtr -> CTime -> CLong -> IO () archiveEntryUnsetMtime :: ArchiveEntryPtr -> IO () archiveEntrySetNlink :: ArchiveEntryPtr -> CUInt -> IO () archiveEntrySetPathname :: ArchiveEntryPtr -> CString -> IO () archiveEntrySetPathnameUtf8 :: ArchiveEntryPtr -> CString -> IO () archiveEntryCopyPathname :: ArchiveEntryPtr -> CString -> IO () archiveEntryCopyPathnameW :: ArchiveEntryPtr -> CWString -> IO () archiveEntryUpdatePathnameUtf8 :: ArchiveEntryPtr -> CString -> IO Bool archiveEntrySetPerm :: ArchiveEntryPtr -> CMode -> IO () archiveEntrySetRdev :: ArchiveEntryPtr -> CDev -> IO () archiveEntrySetRdevmajor :: ArchiveEntryPtr -> CDev -> IO () archiveEntrySetRdevminor :: ArchiveEntryPtr -> CDev -> IO () archiveEntrySetSize :: ArchiveEntryPtr -> LaInt64 -> IO () archiveEntryUnsetSize :: ArchiveEntryPtr -> IO () archiveEntryCopySourcepath :: ArchiveEntryPtr -> CString -> IO () archiveEntryCopySourcepathW :: ArchiveEntryPtr -> CWString -> IO () archiveEntrySetSymlink :: ArchiveEntryPtr -> CString -> IO () archiveEntrySetSymlinkType :: ArchiveEntryPtr -> Symlink -> IO () archiveEntrySetSymlinkUtf8 :: ArchiveEntryPtr -> CString -> IO () archiveEntryCopySymlink :: ArchiveEntryPtr -> CString -> IO () archiveEntryCopySymlinkW :: ArchiveEntryPtr -> CWString -> IO () archiveEntryUpdateSymlinkUtf8 :: ArchiveEntryPtr -> CString -> IO Bool archiveEntrySetUid :: ArchiveEntryPtr -> LaInt64 -> IO () archiveEntrySetUname :: ArchiveEntryPtr -> CString -> IO () archiveEntrySetUnameUtf8 :: ArchiveEntryPtr -> CString -> IO () archiveEntryCopyUname :: ArchiveEntryPtr -> CString -> IO () archiveEntryCopyUnameW :: ArchiveEntryPtr -> CWString -> IO () archiveEntryUpdateUnameUtf8 :: ArchiveEntryPtr -> CString -> IO Bool archiveEntryStat :: ArchiveEntryPtr -> IO StatPtr archiveEntryCopyStat :: ArchiveEntryPtr -> StatPtr -> IO () archiveEntryMacMetadata :: ArchiveEntryPtr -> Ptr CSize -> IO (Ptr a) archiveEntryCopyMacMetadata :: ArchiveEntryPtr -> Ptr a -> CSize -> IO () archiveEntryDigest :: ArchiveEntryPtr -> ArchiveEntryDigest -> IO (Ptr CUChar) archiveEntryAclClear :: ArchiveEntryPtr -> IO () archiveEntryAclNext :: ArchiveEntryPtr -> EntryACL -> Ptr EntryACL -> Ptr EntryACL -> Ptr EntryACL -> Ptr CInt -> Ptr CString -> IO CInt archiveEntryAclReset :: ArchiveEntryPtr -> EntryACL -> IO CInt archiveEntryAclToText :: ArchiveEntryPtr -> Ptr LaSSize -> EntryACL -> IO CString archiveEntryAclToTextW :: ArchiveEntryPtr -> Ptr LaSSize -> EntryACL -> IO CWString archiveEntryAclFromText :: ArchiveEntryPtr -> CString -> EntryACL -> IO CInt archiveEntryAclFromTextW :: ArchiveEntryPtr -> CWString -> EntryACL -> IO CInt archiveEntryAclTypes :: ArchiveEntryPtr -> IO EntryACL archiveEntryAclCount :: ArchiveEntryPtr -> EntryACL -> IO CInt archiveEntryAclAddEntry :: ArchiveEntryPtr -> EntryACL -> EntryACL -> EntryACL -> CInt -> CString -> IO CInt archiveEntryAclAddEntryW :: ArchiveEntryPtr -> EntryACL -> EntryACL -> EntryACL -> CInt -> CWString -> IO CInt archiveEntryXattrClear :: ArchiveEntryPtr -> IO () archiveEntryXattrAddEntry :: ArchiveEntryPtr -> CString -> Ptr a -> CSize -> IO () archiveEntryXattrCount :: ArchiveEntryPtr -> IO CInt archiveEntryXattrReset :: ArchiveEntryPtr -> IO CInt archiveEntryXattrNext :: ArchiveEntryPtr -> Ptr CString -> Ptr (Ptr a) -> Ptr CSize -> IO CInt archiveEntrySparseClear :: ArchiveEntryPtr -> IO () archiveEntrySparseAddEntry :: ArchiveEntryPtr -> LaInt64 -> LaInt64 -> IO () archiveEntrySparseCount :: ArchiveEntryPtr -> IO CInt archiveEntrySparseReset :: ArchiveEntryPtr -> IO CInt archiveEntrySparseNext :: ArchiveEntryPtr -> Ptr LaInt64 -> Ptr LaInt64 -> IO CInt archiveEntryLinkresolverNew :: IO LinkResolverPtr archiveEntryLinkresolverSetStrategy :: LinkResolverPtr -> ArchiveFormat -> IO () archiveEntryLinkresolverFree :: LinkResolverPtr -> IO () archiveEntryLinkify :: LinkResolverPtr -> Ptr (Ptr ArchiveEntry) -> Ptr (Ptr ArchiveEntry) -> IO () archiveEntryPartialLinks :: LinkResolverPtr -> Ptr CUInt -> IO (Ptr ArchiveEntry) archiveEntryACLExecute :: EntryACL archiveEntryACLWrite :: EntryACL archiveEntryACLRead :: EntryACL archiveEntryACLReadData :: EntryACL archiveEntryACLListData :: EntryACL archiveEntryACLWriteData :: EntryACL archiveEntryACLAddFile :: EntryACL archiveEntryACLAppendData :: EntryACL archiveEntryACLAddSubdirectory :: EntryACL archiveEntryACLReadNamedAttrs :: EntryACL archiveEntryACLWriteNamedAttrs :: EntryACL archiveEntryACLDeleteChild :: EntryACL archiveEntryACLReadAttributes :: EntryACL archiveEntryACLWriteAttributes :: EntryACL archiveEntryACLDelete :: EntryACL archiveEntryACLReadACL :: EntryACL archiveEntryACLWriteACL :: EntryACL archiveEntryACLWriteOwner :: EntryACL archiveEntryACLSynchronize :: EntryACL archiveEntryACLEntryFileInherit :: EntryACL archiveEntryACLEntryDirectoryInherit :: EntryACL archiveEntryACLEntryNoPropagateInherit :: EntryACL archiveEntryACLEntryInheritOnly :: EntryACL archiveEntryACLEntrySuccessfulAccess :: EntryACL archiveEntryACLEntryFailedAccess :: EntryACL archiveEntryACLTypeAccess :: EntryACL archiveEntryACLTypeDefault :: EntryACL archiveEntryACLTypeAllow :: EntryACL archiveEntryACLTypeDeny :: EntryACL archiveEntryACLTypeAudit :: EntryACL archiveEntryACLTypeAlarm :: EntryACL archiveEntryACLUser :: EntryACL archiveEntryACLUserObj :: EntryACL archiveEntryACLGroup :: EntryACL archiveEntryACLGroupObj :: EntryACL archiveEntryACLMask :: EntryACL archiveEntryACLOther :: EntryACL archiveEntryACLEveryone :: EntryACL archiveEntryACLStyleExtraID :: EntryACL archiveEntryACLStyleMarkDefault :: EntryACL archiveEntryACLEntryInherited :: EntryACL archiveEntryACLStyleCompact :: EntryACL archiveEntryACLStyleSeparatorComma :: EntryACL archiveEntryACLStyleSolaris :: EntryACL -- | Abstract type data ArchiveEntry data Stat data LinkResolver data FileType FtFifo :: FileType FtCharacter :: FileType FtDirectory :: FileType FtBlock :: FileType FtRegular :: FileType FtLink :: FileType FtSocket :: FileType data EntryACL data Symlink SymlinkUndefined :: Symlink SymlinkFile :: Symlink SymlinkDirectory :: Symlink type ArchiveEntryPtr = ForeignPtr (ArchiveEntry) type LinkResolverPtr = Ptr (LinkResolver) -- | Import this module to get access to the C API. -- -- Functions that are deprecated in the C API are not exposed. module Codec.Archive.Foreign module Codec.Archive.Internal.Unpack hsEntriesAbs :: Integral a => (ArchivePtr -> a -> IO e) -> ArchivePtr -> ArchiveM [Entry FilePath e] -- | Unpack an archive in a given directory unpackEntriesFp :: ArchivePtr -> FilePath -> ArchiveM () -- | This is more efficient than -- --
-- unpackToDir "llvm" =<< BS.readFile "llvm.tar" --unpackArchive :: FilePath -> FilePath -> ArchiveM () -- | Read an archive from a file. The format of the archive is -- automatically detected. readArchiveFile :: FilePath -> ArchiveM [Entry FilePath ByteString] -- | Read an archive contained in a ByteString. The format of the -- archive is automatically detected. readArchiveBS :: ByteString -> Either ArchiveResult [Entry FilePath ByteString] archiveFile :: FilePath -> ArchivePtr -> ArchiveM () bsToArchive :: ByteString -> ArchiveM (ArchivePtr, IO ()) unpackToDir :: FilePath -> ByteString -> ArchiveM () readBS :: ArchivePtr -> Int -> IO ByteString readBSL :: ArchivePtr -> Int -> IO ByteString readEntry :: Integral a => (ArchivePtr -> a -> IO e) -> ArchivePtr -> ArchiveEntryPtr -> IO (Entry FilePath e) readContents :: Integral a => (ArchivePtr -> a -> IO e) -> ArchivePtr -> ArchiveEntryPtr -> IO (EntryContent FilePath e) -- | Yield the next entry in an archive getHsEntry :: Integral a => (ArchivePtr -> a -> IO e) -> ArchivePtr -> IO (Maybe (Entry FilePath e)) -- | Return a list of Entrys. hsEntries :: ArchivePtr -> ArchiveM [Entry FilePath ByteString] -- | Return a list of Entrys. hsEntriesST :: ArchivePtr -> ST s [Entry FilePath ByteString] hsEntriesSTLazy :: ArchivePtr -> ST s [Entry FilePath ByteString] hsEntriesSTAbs :: Integral a => (ArchivePtr -> a -> IO e) -> ArchivePtr -> ST s [Entry FilePath e] module Codec.Archive.Internal.Unpack.Lazy -- | Read an archive lazily. The format of the archive is automatically -- detected. -- -- In general, this will be more efficient than readArchiveBS readArchiveBSL :: ByteString -> Either ArchiveResult [Entry FilePath ByteString] readArchiveBSLAbs :: Integral a => (ArchivePtr -> a -> IO e) -> ByteString -> Either ArchiveResult [Entry FilePath e] -- | In general, this will be more efficient than unpackToDir unpackToDirLazy :: FilePath -> ByteString -> ArchiveM () -- | Lazily stream a ByteString bslToArchive :: ByteString -> ArchiveM ArchivePtr bslToArchiveAbs :: (ArchivePtr -> IO ArchiveResult) -> ByteString -> ArchiveM ArchivePtr module Codec.Archive.Internal.Pack -- | Write some entries to a file, creating a tar archive. This is more -- efficient than -- --
-- BS.writeFile "file.tar" (entriesToBS entries) --entriesToFile :: Foldable t => FilePath -> t (Entry FilePath ByteString) -> ArchiveM () -- | Write some entries to a file, creating a zip archive. entriesToFileZip :: Foldable t => FilePath -> t (Entry FilePath ByteString) -> ArchiveM () -- | Write some entries to a file, creating a .7z archive. entriesToFile7Zip :: Foldable t => FilePath -> t (Entry FilePath ByteString) -> ArchiveM () -- | Write some entries to a file, creating a .cpio archive. entriesToFileCpio :: Foldable t => FilePath -> t (Entry FilePath ByteString) -> ArchiveM () -- | Write some entries to a file, creating a .xar archive. entriesToFileXar :: Foldable t => FilePath -> t (Entry FilePath ByteString) -> ArchiveM () -- | Write some entries to a file, creating a .shar archive. entriesToFileShar :: Foldable t => FilePath -> t (Entry FilePath ByteString) -> ArchiveM () entriesToFileGeneral :: Foldable t => (ArchivePtr -> IO ArchiveResult) -> FilePath -> t (Entry FilePath ByteString) -> ArchiveM () -- | Returns a ByteString containing a tar archive with the -- Entrys entriesToBS :: Foldable t => t (Entry FilePath ByteString) -> ByteString -- | Internal function to be used with -- archive_write_set_format_pax etc. entriesToBSGeneral :: Foldable t => (ArchivePtr -> IO ArchiveResult) -> t (Entry FilePath ByteString) -> ArchiveM ByteString -- | Returns a ByteString containing a zip archive with the -- Entrys entriesToBSzip :: Foldable t => t (Entry FilePath ByteString) -> ByteString -- | Returns a ByteString containing a .7z archive with the -- Entrys entriesToBS7zip :: Foldable t => t (Entry FilePath ByteString) -> ByteString filePacker :: Traversable t => (FilePath -> t (Entry FilePath ByteString) -> ArchiveM ()) -> FilePath -> t FilePath -> ArchiveM () packEntries :: Foldable t => ArchivePtr -> t (Entry FilePath ByteString) -> ArchiveM () noFail :: ArchiveM a -> IO a packToFile :: Traversable t => FilePath -> t FilePath -> ArchiveM () packToFileZip :: Traversable t => FilePath -> t FilePath -> ArchiveM () packToFile7Zip :: Traversable t => FilePath -> t FilePath -> ArchiveM () packToFileCpio :: Traversable t => FilePath -> t FilePath -> ArchiveM () packToFileXar :: Traversable t => FilePath -> t FilePath -> ArchiveM () packToFileShar :: Traversable t => FilePath -> t FilePath -> ArchiveM () archiveEntryAdd :: ArchivePtr -> Entry FilePath ByteString -> ArchiveM () contentAdd :: EntryContent FilePath ByteString -> ArchivePtr -> ArchiveEntryPtr -> ArchiveM () module Codec.Archive.Internal.Pack.Lazy -- | In general, this will be more efficient than entriesToBS entriesToBSL :: Foldable t => t (Entry FilePath ByteString) -> ByteString entriesToBSL7zip :: Foldable t => t (Entry FilePath ByteString) -> ByteString entriesToBSLzip :: Foldable t => t (Entry FilePath ByteString) -> ByteString entriesToBSLCpio :: Foldable t => t (Entry FilePath ByteString) -> ByteString -- | Won't work when built with -system-libarchive or when -- libarchive is not built with zlib support. entriesToBSLXar :: Foldable t => t (Entry FilePath ByteString) -> ByteString entriesToBSLShar :: Foldable t => t (Entry FilePath ByteString) -> ByteString entriesToBSLGeneral :: Foldable t => (ArchivePtr -> IO ArchiveResult) -> t (Entry FilePath ByteString) -> ArchiveM ByteString entriesToIOChunks :: Foldable t => (ArchivePtr -> IO ArchiveResult) -> t (Entry FilePath ByteString) -> (ByteString -> IO ()) -> ArchiveM () packer :: Traversable t => (t (Entry FilePath ByteString) -> ByteString) -> t FilePath -> IO ByteString -- | Pack files into a tar archive. This will be more efficient than -- --
-- BSL.writeFile fp . entriesToBSL --packFiles :: Traversable t => t FilePath -> IO ByteString packFilesZip :: Traversable t => t FilePath -> IO ByteString packFiles7zip :: Traversable t => t FilePath -> IO ByteString packFilesCpio :: Traversable t => t FilePath -> IO ByteString packFilesXar :: Traversable t => t FilePath -> IO ByteString packFilesShar :: Traversable t => t FilePath -> IO ByteString -- | This module contains higher-level functions for working with archives -- in Haskell. See Codec.Archive.Foreign for direct bindings to -- libarchive. module Codec.Archive unpackToDir :: FilePath -> ByteString -> ArchiveM () -- | In general, this will be more efficient than unpackToDir unpackToDirLazy :: FilePath -> ByteString -> ArchiveM () -- | This is more efficient than -- --
-- unpackToDir "llvm" =<< BS.readFile "llvm.tar" --unpackArchive :: FilePath -> FilePath -> ArchiveM () -- | Write some entries to a file, creating a tar archive. This is more -- efficient than -- --
-- BS.writeFile "file.tar" (entriesToBS entries) --entriesToFile :: Foldable t => FilePath -> t (Entry FilePath ByteString) -> ArchiveM () -- | Write some entries to a file, creating a zip archive. entriesToFileZip :: Foldable t => FilePath -> t (Entry FilePath ByteString) -> ArchiveM () -- | Write some entries to a file, creating a .7z archive. entriesToFile7Zip :: Foldable t => FilePath -> t (Entry FilePath ByteString) -> ArchiveM () -- | Write some entries to a file, creating a .cpio archive. entriesToFileCpio :: Foldable t => FilePath -> t (Entry FilePath ByteString) -> ArchiveM () -- | Write some entries to a file, creating a .xar archive. entriesToFileXar :: Foldable t => FilePath -> t (Entry FilePath ByteString) -> ArchiveM () -- | Write some entries to a file, creating a .shar archive. entriesToFileShar :: Foldable t => FilePath -> t (Entry FilePath ByteString) -> ArchiveM () -- | Returns a ByteString containing a tar archive with the -- Entrys entriesToBS :: Foldable t => t (Entry FilePath ByteString) -> ByteString -- | Returns a ByteString containing a .7z archive with the -- Entrys entriesToBS7zip :: Foldable t => t (Entry FilePath ByteString) -> ByteString -- | Returns a ByteString containing a zip archive with the -- Entrys entriesToBSzip :: Foldable t => t (Entry FilePath ByteString) -> ByteString -- | In general, this will be more efficient than entriesToBS entriesToBSL :: Foldable t => t (Entry FilePath ByteString) -> ByteString entriesToBSLzip :: Foldable t => t (Entry FilePath ByteString) -> ByteString entriesToBSL7zip :: Foldable t => t (Entry FilePath ByteString) -> ByteString entriesToBSLCpio :: Foldable t => t (Entry FilePath ByteString) -> ByteString -- | Won't work when built with -system-libarchive or when -- libarchive is not built with zlib support. entriesToBSLXar :: Foldable t => t (Entry FilePath ByteString) -> ByteString entriesToBSLShar :: Foldable t => t (Entry FilePath ByteString) -> ByteString -- | Read an archive from a file. The format of the archive is -- automatically detected. readArchiveFile :: FilePath -> ArchiveM [Entry FilePath ByteString] -- | Read an archive contained in a ByteString. The format of the -- archive is automatically detected. readArchiveBS :: ByteString -> Either ArchiveResult [Entry FilePath ByteString] -- | Read an archive lazily. The format of the archive is automatically -- detected. -- -- In general, this will be more efficient than readArchiveBS readArchiveBSL :: ByteString -> Either ArchiveResult [Entry FilePath ByteString] -- | Pack files into a tar archive. This will be more efficient than -- --
-- BSL.writeFile fp . entriesToBSL --packFiles :: Traversable t => t FilePath -> IO ByteString packFilesZip :: Traversable t => t FilePath -> IO ByteString packFiles7zip :: Traversable t => t FilePath -> IO ByteString packFilesCpio :: Traversable t => t FilePath -> IO ByteString packFilesXar :: Traversable t => t FilePath -> IO ByteString packFilesShar :: Traversable t => t FilePath -> IO ByteString packToFile :: Traversable t => FilePath -> t FilePath -> ArchiveM () packToFileZip :: Traversable t => FilePath -> t FilePath -> ArchiveM () packToFile7Zip :: Traversable t => FilePath -> t FilePath -> ArchiveM () packToFileCpio :: Traversable t => FilePath -> t FilePath -> ArchiveM () packToFileXar :: Traversable t => FilePath -> t FilePath -> ArchiveM () packToFileShar :: Traversable t => FilePath -> t FilePath -> ArchiveM () data ArchiveResult ArchiveFatal :: ArchiveResult ArchiveFailed :: ArchiveResult ArchiveWarn :: ArchiveResult ArchiveRetry :: ArchiveResult ArchiveOk :: ArchiveResult ArchiveEOF :: ArchiveResult data ArchiveEntryDigest ArchiveEntryDigestMD5 :: ArchiveEntryDigest ArchiveEntryDigestRMD160 :: ArchiveEntryDigest ArchiveEntryDigestSHA1 :: ArchiveEntryDigest ArchiveEntryDigestSHA256 :: ArchiveEntryDigest ArchiveEntryDigestSHA384 :: ArchiveEntryDigest ArchiveEntryDigestSHA512 :: ArchiveEntryDigest -- | e is the type of entry contents, for instance -- ByteString -- -- fp is the type of file paths, for instance FilePath data Entry fp e Entry :: !fp -> EntryContent fp e -> !Permissions -> !Ownership -> !Maybe ModTime -> Entry fp e [filepath] :: Entry fp e -> !fp [content] :: Entry fp e -> EntryContent fp e [permissions] :: Entry fp e -> !Permissions [ownership] :: Entry fp e -> !Ownership [time] :: Entry fp e -> !Maybe ModTime data Symlink SymlinkUndefined :: Symlink SymlinkFile :: Symlink SymlinkDirectory :: Symlink data EntryContent fp e NormalFile :: e -> EntryContent fp e Directory :: EntryContent fp e Symlink :: !fp -> !Symlink -> EntryContent fp e Hardlink :: !fp -> EntryContent fp e data Ownership Ownership :: !Maybe String -> !Maybe String -> !Id -> !Id -> Ownership [userName] :: Ownership -> !Maybe String [groupName] :: Ownership -> !Maybe String [ownerId] :: Ownership -> !Id [groupId] :: Ownership -> !Id type Permissions = CMode -- | Pair of a UNIX time stamp and a nanosecond fractional part. type ModTime = (CTime, CLong) -- | A user or group ID type Id = Int64 type ArchiveM = ExceptT ArchiveResult IO runArchiveM :: ArchiveM a -> IO (Either ArchiveResult a) -- | Throws ArchiveResult on error. throwArchiveM :: ArchiveM a -> IO a standardPermissions :: Permissions -- | Also used for directories executablePermissions :: Permissions