hascar-0.1.1.0: Decompress SAPCAR archives

Safe HaskellNone
LanguageHaskell2010

Codec.Archive.SAPCAR

Description

(De-)compress SAPCAR files

Copyright (C) 2016, Virtual Forge GmbH

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Synopsis

Documentation

type SapCar m a = StateT SapCarFile m a Source #

The SAPCAR monad. All operations on SAPCAR files should happen inside this monad.

data CarEntry Source #

Meta information about a single file or directory in a SAPCAR archive

Constructors

CarEntry 

Fields

carEntryFilename :: CarEntry -> Text Source #

Get the filename of a car entry

withSapCarFile :: (MonadIO m, MonadThrow m, MonadMask m) => FilePath -> SapCar m a -> m a Source #

Run all actions in the SapCar monad.

withSapCarPath :: (MonadIO m, MonadThrow m, MonadMask m) => Path b File -> SapCar m a -> m a Source #

Run all actions in the SapCar monad.

withSapCarHandle :: (MonadIO m, MonadThrow m, MonadMask m) => SapCar m a -> Handle -> m a Source #

Run all actions in the SapCar monad.

getEntries :: MonadIO m => SapCar m [CarEntry] Source #

Get all entries contained inside the SapCar file.

sourceEntry :: MonadIO m => CarEntry -> Sink ByteString IO a -> SapCar m a Source #

Stream the contents of the given SapCar entry to the specified conduit sink.

writeToFile :: (MonadIO m, MonadMask m, MonadThrow m) => CarEntry -> Path b File -> SapCar m () Source #

Write a SapCar entry to the specified file.

writeToHandle :: (MonadIO m, MonadMask m, MonadThrow m) => CarEntry -> Handle -> SapCar m () Source #

Write a SapCar entry to the specified handle.