/usr/share/doc/libghc-libzip-doc/html/Codec-Archive-LibZip.html is in libghc-libzip-doc 0.10-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Codec.Archive.LibZip</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Codec-Archive-LibZip.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Codec-Archive-LibZip.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">LibZip-0.10: Bindings to libzip, a library for manipulating zip archives.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe-Infered</td></tr></table><p class="caption">Codec.Archive.LibZip</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Types
</a></li><li><a href="#g:2">Archive operations
</a></li><li><a href="#g:3">File reading operations
</a></li><li><a href="#g:4">Flags and options
</a></li><li><a href="#g:5">Exception handling
</a></li><li><a href="#g:6">Re-exports
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Monadic interface to <code>libzip</code>.
</p><p>Most of the operations on zip archive happen within <code><a href="Codec-Archive-LibZip.html#t:Archive">Archive</a></code> monad
(see <code><a href="Codec-Archive-LibZip.html#v:withArchive">withArchive</a></code>).
Partial reading of the files in the archive may be performed from
within <code><a href="Codec-Archive-LibZip.html#t:Entry">Entry</a></code> monad (see <code><a href="Codec-Archive-LibZip.html#v:fromFile">fromFile</a></code>).
Both <code><a href="Codec-Archive-LibZip.html#t:Archive">Archive</a></code> and <code><a href="Codec-Archive-LibZip.html#t:Entry">Entry</a></code> are monad transformers over <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a></code>, and allow
for IO with single and double <code><a href="Codec-Archive-LibZip.html#v:lift">lift</a></code>ing respectingly.
</p><p>Note: LibZip does not handle text encodings. Even if its API accepts
<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></code>s (e.g. in <code><a href="Codec-Archive-LibZip.html#v:sourceBuffer">sourceBuffer</a></code>), character codes above 255 should
not be used. The user is responsible of proper encoding the text
data.
</p><p><em>Examples</em>
</p><p>List files in the zip archive:
</p><pre>
import System.Environment (getArgs)
import Codec.Archive.LibZip
main = do
(zipfile:_) <- getArgs
files <- withArchive [] zipfile $ fileNames []
mapM_ putStrLn files
</pre><p>Create a zip archive and a add file to the archive:
</p><pre>
import System.Environment (getArgs)
import Codec.Archive.LibZip
main = do
(zipfile:_) <- getArgs
withArchive [CreateFlag] zipfile $ do
zs <- sourceBuffer "Hello World!"
addFile "hello.txt" zs
</pre><p>Extract and print a file from the zip archive:
</p><pre>
import System.Environment (getArgs)
import Codec.Archive.LibZip
main = do
(zipfile:file:_) <- getArgs
bytes <- withArchive [] zipfile $ fileContents [] file
putStrLn bytes
</pre><p>See also an implementation of a simple zip archiver <code>hzip.hs</code> in the
<code>examples/</code> directory of the source distribution.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Archive">Archive</a> a = <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> <a href="Codec-Archive-LibZip-Types.html#t:Zip">Zip</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><span class="keyword">type</span> <a href="#t:Entry">Entry</a> a = <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> (<a href="Codec-Archive-LibZip-Types.html#t:ZipFile">ZipFile</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a>, [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]) (<a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> <a href="Codec-Archive-LibZip-Types.html#t:Zip">Zip</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a>) a</li><li class="src short"><span class="keyword">data</span> <a href="#t:ZipStat">ZipStat</a> = <a href="#v:ZipStat">ZipStat</a> {<ul class="subs"><li><a href="#v:zs-39-valid">zs'valid</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Word.html#t:Word64">Word64</a></li><li><a href="#v:zs-39-name">zs'name</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></li><li><a href="#v:zs-39-index">zs'index</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></li><li><a href="#v:zs-39-size">zs'size</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></li><li><a href="#v:zs-39-comp_size">zs'comp_size</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></li><li><a href="#v:zs-39-mtime">zs'mtime</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/time-1.4/Data-Time-Clock.html#t:UTCTime">UTCTime</a></li><li><a href="#v:zs-39-crc">zs'crc</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Word.html#t:Word">Word</a></li><li><a href="#v:zs-39-comp_method">zs'comp_method</a> :: <a href="Codec-Archive-LibZip.html#t:ZipCompMethod">ZipCompMethod</a></li><li><a href="#v:zs-39-encryption_method">zs'encryption_method</a> :: <a href="Codec-Archive-LibZip.html#t:ZipEncryptionMethod">ZipEncryptionMethod</a></li><li><a href="#v:zs-39-flags">zs'flags</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Word.html#t:Word32">Word32</a></li></ul>}</li><li class="src short"><a href="#v:withArchive">withArchive</a> :: [<a href="Codec-Archive-LibZip.html#t:OpenFlag">OpenFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:getZip">getZip</a> :: <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="Codec-Archive-LibZip-Types.html#t:Zip">Zip</a></li><li class="src short"><a href="#v:numFiles">numFiles</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></li><li class="src short"><a href="#v:fileName">fileName</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:nameLocate">nameLocate</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a>)</li><li class="src short"><a href="#v:fileNames">fileNames</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a>]</li><li class="src short"><a href="#v:fileSize">fileSize</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></li><li class="src short"><a href="#v:fileSizeIx">fileSizeIx</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></li><li class="src short"><a href="#v:fileStat">fileStat</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="Codec-Archive-LibZip.html#t:ZipStat">ZipStat</a></li><li class="src short"><a href="#v:fileStatIx">fileStatIx</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="Codec-Archive-LibZip.html#t:ZipStat">ZipStat</a></li><li class="src short"><a href="#v:deleteFile">deleteFile</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:deleteFileIx">deleteFileIx</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:renameFile">renameFile</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:renameFileIx">renameFileIx</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:addFile">addFile</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="Codec-Archive-LibZip-Types.html#t:ZipSource">ZipSource</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:addDirectory">addDirectory</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:replaceFile">replaceFile</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="Codec-Archive-LibZip-Types.html#t:ZipSource">ZipSource</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:replaceFileIx">replaceFileIx</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Codec-Archive-LibZip-Types.html#t:ZipSource">ZipSource</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:sourceBuffer">sourceBuffer</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> a => [a] -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="Codec-Archive-LibZip-Types.html#t:ZipSource">ZipSource</a></li><li class="src short"><a href="#v:sourceFile">sourceFile</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="Codec-Archive-LibZip-Types.html#t:ZipSource">ZipSource</a></li><li class="src short"><a href="#v:sourceZip">sourceZip</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="Codec-Archive-LibZip-Types.html#t:Zip">Zip</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="Codec-Archive-LibZip-Types.html#t:ZipSource">ZipSource</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:PureSource">PureSource</a> a st szt = <a href="#v:PureSource">PureSource</a> {<ul class="subs"><li><a href="#v:srcState">srcState</a> :: st</li><li><a href="#v:srcSize">srcSize</a> :: szt</li><li><a href="#v:srcMTime">srcMTime</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/time-1.4/Data-Time-Clock.html#t:UTCTime">UTCTime</a></li><li><a href="#v:readSrc">readSrc</a> :: szt -> st -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (szt, [a], st)</li></ul>}</li><li class="src short"><a href="#v:sourcePure">sourcePure</a> :: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> a, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Foreign-Storable.html#t:Storable">Storable</a> a, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Foreign-Storable.html#t:Storable">Storable</a> st, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integral">Integral</a> szt) => <a href="Codec-Archive-LibZip.html#t:PureSource">PureSource</a> a st szt -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="Codec-Archive-LibZip-Types.html#t:ZipSource">ZipSource</a></li><li class="src short"><a href="#v:getComment">getComment</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)</li><li class="src short"><a href="#v:setComment">setComment</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:removeComment">removeComment</a> :: <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:getFileComment">getFileComment</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)</li><li class="src short"><a href="#v:getFileCommentIx">getFileCommentIx</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)</li><li class="src short"><a href="#v:setFileComment">setFileComment</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:setFileCommentIx">setFileCommentIx</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:removeFileComment">removeFileComment</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:removeFileCommentIx">removeFileCommentIx</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:unchangeFile">unchangeFile</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:unchangeFileIx">unchangeFileIx</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:unchangeArchive">unchangeArchive</a> :: <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:unchangeAll">unchangeAll</a> :: <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:fromFile">fromFile</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="Codec-Archive-LibZip.html#t:Entry">Entry</a> a -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> a</li><li class="src short"><a href="#v:fromFileIx">fromFileIx</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Codec-Archive-LibZip.html#t:Entry">Entry</a> a -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> a</li><li class="src short"><a href="#v:readBytes">readBytes</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> a => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Codec-Archive-LibZip.html#t:Entry">Entry</a> [a]</li><li class="src short"><a href="#v:skipBytes">skipBytes</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Codec-Archive-LibZip.html#t:Entry">Entry</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:readContents">readContents</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> a => <a href="Codec-Archive-LibZip.html#t:Entry">Entry</a> [a]</li><li class="src short"><a href="#v:fileContents">fileContents</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> a => [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> [a]</li><li class="src short"><a href="#v:fileContentsIx">fileContentsIx</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> a => [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> [a]</li><li class="src short"><span class="keyword">data</span> <a href="#t:OpenFlag">OpenFlag</a> <ul class="subs"><li>= <a href="#v:CreateFlag">CreateFlag</a> </li><li>| <a href="#v:ExclFlag">ExclFlag</a> </li><li>| <a href="#v:CheckConsFlag">CheckConsFlag</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:FileFlag">FileFlag</a> <ul class="subs"><li>= <a href="#v:FileNOCASE">FileNOCASE</a> </li><li>| <a href="#v:FileNODIR">FileNODIR</a> </li><li>| <a href="#v:FileCOMPRESSED">FileCOMPRESSED</a> </li><li>| <a href="#v:FileUNCHANGED">FileUNCHANGED</a> </li><li>| <a href="#v:FileRECOMPRESS">FileRECOMPRESS</a> </li><li>| <a href="#v:FileENCRYPTED">FileENCRYPTED</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:ZipCompMethod">ZipCompMethod</a> <ul class="subs"><li>= <a href="#v:CompDEFAULT">CompDEFAULT</a> </li><li>| <a href="#v:CompSTORE">CompSTORE</a> </li><li>| <a href="#v:CompSHRINK">CompSHRINK</a> </li><li>| <a href="#v:CompREDUCE_1">CompREDUCE_1</a> </li><li>| <a href="#v:CompREDUCE_2">CompREDUCE_2</a> </li><li>| <a href="#v:CompREDUCE_3">CompREDUCE_3</a> </li><li>| <a href="#v:CompREDUCE_4">CompREDUCE_4</a> </li><li>| <a href="#v:CompIMPLODE">CompIMPLODE</a> </li><li>| <a href="#v:CompDEFLATE">CompDEFLATE</a> </li><li>| <a href="#v:CompDEFLATE64">CompDEFLATE64</a> </li><li>| <a href="#v:CompPKWARE_IMPLODE">CompPKWARE_IMPLODE</a> </li><li>| <a href="#v:CompBZIP2">CompBZIP2</a> </li><li>| <a href="#v:CompLZMA">CompLZMA</a> </li><li>| <a href="#v:CompTERSE">CompTERSE</a> </li><li>| <a href="#v:CompLZ77">CompLZ77</a> </li><li>| <a href="#v:CompWAVPACK">CompWAVPACK</a> </li><li>| <a href="#v:CompPPMD">CompPPMD</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:ZipEncryptionMethod">ZipEncryptionMethod</a> <ul class="subs"><li>= <a href="#v:EncryptNONE">EncryptNONE</a> </li><li>| <a href="#v:EncryptTRAD_PKWARE">EncryptTRAD_PKWARE</a> </li><li>| <a href="#v:EncryptUNKNOWN">EncryptUNKNOWN</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:ZipError">ZipError</a> <ul class="subs"><li>= <a href="#v:ErrOK">ErrOK</a> </li><li>| <a href="#v:ErrMULTIDISK">ErrMULTIDISK</a> </li><li>| <a href="#v:ErrRENAME">ErrRENAME</a> </li><li>| <a href="#v:ErrCLOSE">ErrCLOSE</a> </li><li>| <a href="#v:ErrSEEK">ErrSEEK</a> </li><li>| <a href="#v:ErrREAD">ErrREAD</a> </li><li>| <a href="#v:ErrWRITE">ErrWRITE</a> </li><li>| <a href="#v:ErrCRC">ErrCRC</a> </li><li>| <a href="#v:ErrZIPCLOSED">ErrZIPCLOSED</a> </li><li>| <a href="#v:ErrNOENT">ErrNOENT</a> </li><li>| <a href="#v:ErrEXISTS">ErrEXISTS</a> </li><li>| <a href="#v:ErrOPEN">ErrOPEN</a> </li><li>| <a href="#v:ErrTMPOPEN">ErrTMPOPEN</a> </li><li>| <a href="#v:ErrZLIB">ErrZLIB</a> </li><li>| <a href="#v:ErrMEMORY">ErrMEMORY</a> </li><li>| <a href="#v:ErrCHANGED">ErrCHANGED</a> </li><li>| <a href="#v:ErrCOMPNOTSUPP">ErrCOMPNOTSUPP</a> </li><li>| <a href="#v:ErrEOF">ErrEOF</a> </li><li>| <a href="#v:ErrINVAL">ErrINVAL</a> </li><li>| <a href="#v:ErrNOZIP">ErrNOZIP</a> </li><li>| <a href="#v:ErrINTERNAL">ErrINTERNAL</a> </li><li>| <a href="#v:ErrINCONS">ErrINCONS</a> </li><li>| <a href="#v:ErrREMOVE">ErrREMOVE</a> </li><li>| <a href="#v:ErrDELETED">ErrDELETED</a> </li><li>| <a href="#v:ErrENCRNOTSUPP">ErrENCRNOTSUPP</a> </li><li>| <a href="#v:ErrRDONLY">ErrRDONLY</a> </li><li>| <a href="#v:ErrNOPASSWD">ErrNOPASSWD</a> </li><li>| <a href="#v:ErrWRONGPASSWD">ErrWRONGPASSWD</a> </li></ul></li><li class="src short"><a href="#v:catchZipError">catchZipError</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> a -> (<a href="Codec-Archive-LibZip.html#t:ZipError">ZipError</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> a) -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:lift">lift</a> :: MonadTrans t => <span class="keyword">forall</span> m a. <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => m a -> t m a</li></ul></div><div id="interface"><h1 id="g:1">Types
</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Archive" class="def">Archive</a> a = <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> <a href="Codec-Archive-LibZip-Types.html#t:Zip">Zip</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> a<a href="src/Codec-Archive-LibZip.html#Archive" class="link">Source</a></p><div class="doc"><p>Monadic computation with a zip archive. See <code><a href="Codec-Archive-LibZip.html#v:withArchive">withArchive</a></code>.
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Entry" class="def">Entry</a> a = <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> (<a href="Codec-Archive-LibZip-Types.html#t:ZipFile">ZipFile</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a>, [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]) (<a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> <a href="Codec-Archive-LibZip-Types.html#t:Zip">Zip</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a>) a<a href="src/Codec-Archive-LibZip.html#Entry" class="link">Source</a></p><div class="doc"><p>Monadic computation to read from open archive entries.
See <code><a href="Codec-Archive-LibZip.html#v:fromFile">fromFile</a></code> and <code><a href="Codec-Archive-LibZip.html#v:fromFileIx">fromFileIx</a></code>.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ZipStat" class="def">ZipStat</a> <a href="src/Codec-Archive-LibZip-Types.html#ZipStat" class="link">Source</a></p><div class="doc"><p>File statistics expressed in native Haskell types.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ZipStat" class="def">ZipStat</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:zs-39-valid" class="def">zs'valid</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Word.html#t:Word64">Word64</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:zs-39-name" class="def">zs'name</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:zs-39-index" class="def">zs'index</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:zs-39-size" class="def">zs'size</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:zs-39-comp_size" class="def">zs'comp_size</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:zs-39-mtime" class="def">zs'mtime</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/time-1.4/Data-Time-Clock.html#t:UTCTime">UTCTime</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:zs-39-crc" class="def">zs'crc</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Word.html#t:Word">Word</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:zs-39-comp_method" class="def">zs'comp_method</a> :: <a href="Codec-Archive-LibZip.html#t:ZipCompMethod">ZipCompMethod</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:zs-39-encryption_method" class="def">zs'encryption_method</a> :: <a href="Codec-Archive-LibZip.html#t:ZipEncryptionMethod">ZipEncryptionMethod</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:zs-39-flags" class="def">zs'flags</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Word.html#t:Word32">Word32</a></dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:ZipStat" class="caption collapser" onclick="toggleSection('i:ZipStat')">Instances</p><div id="section.i:ZipStat" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> <a href="Codec-Archive-LibZip.html#t:ZipStat">ZipStat</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> <a href="Codec-Archive-LibZip.html#t:ZipStat">ZipStat</a></td><td class="doc empty"> </td></tr></table></div></div></div><h1 id="g:2">Archive operations
</h1><div class="top"><p class="src"><a name="v:withArchive" class="def">withArchive</a><a href="src/Codec-Archive-LibZip.html#withArchive" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:OpenFlag">OpenFlag</a>]</td><td class="doc"><p>Checks for consistency or existence.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Filename of the zip archive.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> a</td><td class="doc"><p>Action to do with the archive.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> a</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Top-level wrapper for operations with an open
archive. <code><a href="Codec-Archive-LibZip.html#v:withArchive">withArchive</a></code> opens and closes the file
automatically. On error it throws <code><a href="Codec-Archive-LibZip.html#t:ZipError">ZipError</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:getZip" class="def">getZip</a> :: <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="Codec-Archive-LibZip-Types.html#t:Zip">Zip</a><a href="src/Codec-Archive-LibZip.html#getZip" class="link">Source</a></p><div class="doc"><p>Get archive handler. Throw <code><a href="Codec-Archive-LibZip.html#v:ErrINVAL">ErrINVAL</a></code> if the archive is closed.
</p></div></div><div class="top"><p class="src"><a name="v:numFiles" class="def">numFiles</a> :: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a><a href="src/Codec-Archive-LibZip.html#numFiles" class="link">Source</a></p><div class="doc"><p>Get the number of entries in the archive.
</p></div></div><div class="top"><p class="src"><a name="v:fileName" class="def">fileName</a><a href="src/Codec-Archive-LibZip.html#fileName" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p><code><a href="Codec-Archive-LibZip.html#v:FileUNCHANGED">FileUNCHANGED</a></code> flag can be used.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Position index of a file in the archive.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Name of the file in the archive.
</p></td></tr></table></div><div class="doc"><p>Get name of an entry in the archive by its index.
</p></div></div><div class="top"><p class="src"><a name="v:nameLocate" class="def">nameLocate</a><a href="src/Codec-Archive-LibZip.html#nameLocate" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p>Filename lookup mode.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Name of the file in the archive.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a>)</td><td class="doc"><p><code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#v:Just">Just</a></code> position index if found.
</p></td></tr></table></div><div class="doc"><p>Locate an entry (get its index) in the archive by its name.
</p></div></div><div class="top"><p class="src"><a name="v:fileNames" class="def">fileNames</a><a href="src/Codec-Archive-LibZip.html#fileNames" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p><code><a href="Codec-Archive-LibZip.html#v:FileUNCHANGED">FileUNCHANGED</a></code> flag is accepted.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a>]</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Get names of all entries (files and directories) in the archive.
</p></div></div><div class="top"><p class="src"><a name="v:fileSize" class="def">fileSize</a><a href="src/Codec-Archive-LibZip.html#fileSize" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p>Filename lookup mode, <code><a href="Codec-Archive-LibZip.html#v:FileUNCHANGED">FileUNCHANGED</a></code> can be used.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Name of the file in the archive.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>File size.
</p></td></tr></table></div><div class="doc"><p>Get size of a file in the archive.
</p></div></div><div class="top"><p class="src"><a name="v:fileSizeIx" class="def">fileSizeIx</a><a href="src/Codec-Archive-LibZip.html#fileSizeIx" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p><code><a href="Codec-Archive-LibZip.html#v:FileUNCHANGED">FileUNCHANGED</a></code> is accepted.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Position index of a file in the archive.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>File size.
</p></td></tr></table></div><div class="doc"><p>Get size of a file in the archive (by index).
</p></div></div><div class="top"><p class="src"><a name="v:fileStat" class="def">fileStat</a><a href="src/Codec-Archive-LibZip.html#fileStat" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p>Filename lookup mode, <code><a href="Codec-Archive-LibZip.html#v:FileUNCHANGED">FileUNCHANGED</a></code> can be used.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Name of the file in the archive.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="Codec-Archive-LibZip.html#t:ZipStat">ZipStat</a></td><td class="doc"><p>Infomation about the file.
</p></td></tr></table></div><div class="doc"><p>Get information about a file in the archive.
</p></div></div><div class="top"><p class="src"><a name="v:fileStatIx" class="def">fileStatIx</a><a href="src/Codec-Archive-LibZip.html#fileStatIx" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p><code><a href="Codec-Archive-LibZip.html#v:FileUNCHANGED">FileUNCHANGED</a></code> can be used.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Position index of a file in the archive.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="Codec-Archive-LibZip.html#t:ZipStat">ZipStat</a></td><td class="doc"><p>Information about the file.
</p></td></tr></table></div><div class="doc"><p>Get information about a file in the archive (by index).
</p></div></div><div class="top"><p class="src"><a name="v:deleteFile" class="def">deleteFile</a><a href="src/Codec-Archive-LibZip.html#deleteFile" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p>Filename lookup mode.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Filename.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Delete file from the archive.
</p></div></div><div class="top"><p class="src"><a name="v:deleteFileIx" class="def">deleteFileIx</a><a href="src/Codec-Archive-LibZip.html#deleteFileIx" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Position index of a file in the archive.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Delete file (referenced by position index) from the archive.
</p></div></div><div class="top"><p class="src"><a name="v:renameFile" class="def">renameFile</a><a href="src/Codec-Archive-LibZip.html#renameFile" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p>Filename lookup mode.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Old name.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>New name.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Rename file in the archive.
</p></div></div><div class="top"><p class="src"><a name="v:renameFileIx" class="def">renameFileIx</a><a href="src/Codec-Archive-LibZip.html#renameFileIx" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Position index of a file in the archive.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>New name.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Rename file (referenced by position index) in the archive.
</p></div></div><div class="top"><p class="src"><a name="v:addFile" class="def">addFile</a><a href="src/Codec-Archive-LibZip.html#addFile" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Name of the file to create.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip-Types.html#t:ZipSource">ZipSource</a></td><td class="doc"><p>Source where file data is obtained from.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Position index of the new file.
</p></td></tr></table></div><div class="doc"><p>Add a file to the archive.
</p></div></div><div class="top"><p class="src"><a name="v:addDirectory" class="def">addDirectory</a><a href="src/Codec-Archive-LibZip.html#addDirectory" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Directory's name in the archive.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Position index of the new directory entry.
</p></td></tr></table></div><div class="doc"><p>Add a directory to the archive.
</p></div></div><div class="top"><p class="src"><a name="v:replaceFile" class="def">replaceFile</a><a href="src/Codec-Archive-LibZip.html#replaceFile" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p>Filename lookup mode.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>File to replace.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip-Types.html#t:ZipSource">ZipSource</a></td><td class="doc"><p>Source where the new file data is obtained from.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Replace a file in the archive.
</p></div></div><div class="top"><p class="src"><a name="v:replaceFileIx" class="def">replaceFileIx</a><a href="src/Codec-Archive-LibZip.html#replaceFileIx" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Position index of a file in the archive.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip-Types.html#t:ZipSource">ZipSource</a></td><td class="doc"><p>Source where the new file data is obtained from
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Replace a file in the archive (referenced by position index).
</p></div></div><div class="top"><p class="src"><a name="v:sourceBuffer" class="def">sourceBuffer</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> a => [a] -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="Codec-Archive-LibZip-Types.html#t:ZipSource">ZipSource</a><a href="src/Codec-Archive-LibZip.html#sourceBuffer" class="link">Source</a></p><div class="doc"><p>Create a data source. Note: input is converted to <code>[Word8]</code> internally.
</p></div></div><div class="top"><p class="src"><a name="v:sourceFile" class="def">sourceFile</a><a href="src/Codec-Archive-LibZip.html#sourceFile" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>File to open.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Offset from the beginning of the file.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>The number of bytes to read. If <code>0</code> or <code>-1</code>,
the read till the end of file.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="Codec-Archive-LibZip-Types.html#t:ZipSource">ZipSource</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Create a data source from a file.
</p></div></div><div class="top"><p class="src"><a name="v:sourceZip" class="def">sourceZip</a><a href="src/Codec-Archive-LibZip.html#sourceZip" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p><code><a href="Codec-Archive-LibZip.html#v:FileUNCHANGED">FileUNCHANGED</a></code> and <code><a href="Codec-Archive-LibZip.html#v:FileRECOMPRESS">FileRECOMPRESS</a></code> can be used.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip-Types.html#t:Zip">Zip</a></td><td class="doc"><p>Source archive.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Position index of a file in the source archive.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Offset from the beginning of the file.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>The number of bytes to read. If <code>0</code> or <code>-1</code>,
then read till the end of file.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="Codec-Archive-LibZip-Types.html#t:ZipSource">ZipSource</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Create a data source from a file in the zip archive.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PureSource" class="def">PureSource</a> a st szt <a href="src/Codec-Archive-LibZip.html#PureSource" class="link">Source</a></p><div class="doc"><p>Wrapper for a user-provided pure function to be used with <code><a href="Codec-Archive-LibZip.html#v:sourcePure">sourcePure</a></code>.
Data size should be known in advance (<code><a href="Codec-Archive-LibZip.html#v:srcSize">srcSize</a></code>).
The function should support reading by chunks (<code><a href="Codec-Archive-LibZip.html#v:readSrc">readSrc</a></code>).
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PureSource" class="def">PureSource</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:srcState" class="def">srcState</a> :: st</dt><dd class="doc"><p>Initial state of the source.
</p></dd><dt class="src"><a name="v:srcSize" class="def">srcSize</a> :: szt</dt><dd class="doc"><p>Total size of the data.
</p></dd><dt class="src"><a name="v:srcMTime" class="def">srcMTime</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/time-1.4/Data-Time-Clock.html#t:UTCTime">UTCTime</a></dt><dd class="doc"><p>Modification time (current time if Nothing).
</p></dd><dt class="src"><a name="v:readSrc" class="def">readSrc</a> :: szt -> st -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (szt, [a], st)</dt><dd class="doc"><p>Read a chunk of the data, return <code>Just</code> the size
of data read, the data themselves and the new state
of the source, or <code>Nothing</code> on error.
</p></dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><a name="v:sourcePure" class="def">sourcePure</a> :: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> a, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Foreign-Storable.html#t:Storable">Storable</a> a, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Foreign-Storable.html#t:Storable">Storable</a> st, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integral">Integral</a> szt) => <a href="Codec-Archive-LibZip.html#t:PureSource">PureSource</a> a st szt -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="Codec-Archive-LibZip-Types.html#t:ZipSource">ZipSource</a><a href="src/Codec-Archive-LibZip.html#sourcePure" class="link">Source</a></p><div class="doc"><p>Create a data source from a <code><a href="Codec-Archive-LibZip.html#t:PureSource">PureSource</a></code>.
Note: input of <code>[a]</code> is converted to <code>[Word8]</code> internally.
</p></div></div><div class="top"><p class="src"><a name="v:getComment" class="def">getComment</a><a href="src/Codec-Archive-LibZip.html#getComment" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p><code><a href="Codec-Archive-LibZip.html#v:FileUNCHANGED">FileUNCHANGED</a></code> can be used.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Get zip archive comment.
</p></div></div><div class="top"><p class="src"><a name="v:setComment" class="def">setComment</a><a href="src/Codec-Archive-LibZip.html#setComment" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></td><td class="doc"><p>Comment message.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Set zip archive comment.
</p></div></div><div class="top"><p class="src"><a name="v:removeComment" class="def">removeComment</a> :: <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Codec-Archive-LibZip.html#removeComment" class="link">Source</a></p><div class="doc"><p>Remove zip archive comment.
</p></div></div><div class="top"><p class="src"><a name="v:getFileComment" class="def">getFileComment</a><a href="src/Codec-Archive-LibZip.html#getFileComment" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p>Filename lookup mode.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Filename
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Get comment for a file in the archive.
</p></div></div><div class="top"><p class="src"><a name="v:getFileCommentIx" class="def">getFileCommentIx</a><a href="src/Codec-Archive-LibZip.html#getFileCommentIx" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p>FileUNCHANGED can be used.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Position index of the file.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>)</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Get comment for a file in the archive (referenced by position index).
</p></div></div><div class="top"><p class="src"><a name="v:setFileComment" class="def">setFileComment</a><a href="src/Codec-Archive-LibZip.html#setFileComment" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p>Name lookup mode.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Filename.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></td><td class="doc"><p>New file comment.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Set comment for a file in the archive.
</p></div></div><div class="top"><p class="src"><a name="v:setFileCommentIx" class="def">setFileCommentIx</a><a href="src/Codec-Archive-LibZip.html#setFileCommentIx" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Position index of a file in the archive.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></td><td class="doc"><p>New file comment.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Set comment for a file in the archive (referenced by position index).
</p></div></div><div class="top"><p class="src"><a name="v:removeFileComment" class="def">removeFileComment</a><a href="src/Codec-Archive-LibZip.html#removeFileComment" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p>Filename lookup mode.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Filename.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Remove comment for a file in the archive.
</p></div></div><div class="top"><p class="src"><a name="v:removeFileCommentIx" class="def">removeFileCommentIx</a><a href="src/Codec-Archive-LibZip.html#removeFileCommentIx" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Position index of a file in the archive.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Remove comment for a file in the archive (referenced by position index).
</p></div></div><div class="top"><p class="src"><a name="v:unchangeFile" class="def">unchangeFile</a><a href="src/Codec-Archive-LibZip.html#unchangeFile" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p>Filename lookup mode.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Filename.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Undo changes to a file in the archive.
</p></div></div><div class="top"><p class="src"><a name="v:unchangeFileIx" class="def">unchangeFileIx</a><a href="src/Codec-Archive-LibZip.html#unchangeFileIx" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Position index of a file in the archive.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Undo changes to a file in the archive (referenced by position index).
</p></div></div><div class="top"><p class="src"><a name="v:unchangeArchive" class="def">unchangeArchive</a> :: <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Codec-Archive-LibZip.html#unchangeArchive" class="link">Source</a></p><div class="doc"><p>Undo global changes to zip archive (revert changes to the archive
comment and global flags).
</p></div></div><div class="top"><p class="src"><a name="v:unchangeAll" class="def">unchangeAll</a> :: <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Codec-Archive-LibZip.html#unchangeAll" class="link">Source</a></p><div class="doc"><p>Undo all changes in a zip archive.
</p></div></div><h1 id="g:3">File reading operations
</h1><div class="top"><p class="src"><a name="v:fromFile" class="def">fromFile</a><a href="src/Codec-Archive-LibZip.html#fromFile" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p>Filename lookup mode,
<code><a href="Codec-Archive-LibZip.html#v:FileCOMPRESSED">FileCOMPRESSED</a></code> and <code><a href="Codec-Archive-LibZip.html#v:FileUNCHANGED">FileUNCHANGED</a></code> can be used.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>Name of the file in the arhive.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Entry">Entry</a> a</td><td class="doc"><p>Action with the file.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> a</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Wrapper for operations with a file in the archive. <code><a href="Codec-Archive-LibZip.html#v:fromFile">fromFile</a></code> is normally
called from within an <code><a href="Codec-Archive-LibZip.html#t:Archive">Archive</a></code> action (see also <code><a href="Codec-Archive-LibZip.html#v:withArchive">withArchive</a></code>).
<code><a href="Codec-Archive-LibZip.html#v:fromFile">fromFile</a></code> can be replaced with <code><a href="Codec-Archive-LibZip.html#v:fileContents">fileContents</a></code> to read an entire file at
once.
</p></div></div><div class="top"><p class="src"><a name="v:fromFileIx" class="def">fromFileIx</a><a href="src/Codec-Archive-LibZip.html#fromFileIx" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>]</td><td class="doc"><p><code><a href="Codec-Archive-LibZip.html#v:FileCOMPRESSED">FileCOMPRESSED</a></code> and <code><a href="Codec-Archive-LibZip.html#v:FileUNCHANGED">FileUNCHANGED</a></code> can be used.
</p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Position index of a file in the archive.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Entry">Entry</a> a</td><td class="doc"><p>Action with the file.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> a</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Wrapper for operations with a file in the archive. File is referenced
by index (position). <code><a href="Codec-Archive-LibZip.html#v:fromFileIx">fromFileIx</a></code> is normally called from within
an <code><a href="Codec-Archive-LibZip.html#t:Archive">Archive</a></code> action (see also <code><a href="Codec-Archive-LibZip.html#v:withArchive">withArchive</a></code>). <code><a href="Codec-Archive-LibZip.html#v:fromFileIx">fromFileIx</a></code> can be replaced
with <code><a href="Codec-Archive-LibZip.html#v:fileContentsIx">fileContentsIx</a></code> to read an entire file at once.
</p></div></div><div class="top"><p class="src"><a name="v:readBytes" class="def">readBytes</a><a href="src/Codec-Archive-LibZip.html#readBytes" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>The number of bytes to read.
</p></td></tr><tr><td class="src">-> <a href="Codec-Archive-LibZip.html#t:Entry">Entry</a> [a]</td><td class="doc"><p>Bytes read.
</p></td></tr></table></div><div class="doc"><p>Read at most <code>n</code> bytes from the file.
</p></div></div><div class="top"><p class="src"><a name="v:skipBytes" class="def">skipBytes</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Codec-Archive-LibZip.html#t:Entry">Entry</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Codec-Archive-LibZip.html#skipBytes" class="link">Source</a></p><div class="doc"><p>Skip <code>n</code> bytes from the open file. Note: this is not faster than reading.
</p></div></div><div class="top"><p class="src"><a name="v:readContents" class="def">readContents</a><a href="src/Codec-Archive-LibZip.html#readContents" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="Codec-Archive-LibZip.html#t:Entry">Entry</a> [a]</td><td class="doc"><p>Contents of the file.
</p></td></tr></table></div><div class="doc"><p>Read entire file contents.
</p></div></div><div class="top"><p class="src"><a name="v:fileContents" class="def">fileContents</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> a => [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> [a]<a href="src/Codec-Archive-LibZip.html#fileContents" class="link">Source</a></p><div class="doc"><p>Read entire file. Shortcut for <code><a href="Codec-Archive-LibZip.html#v:readContents">readContents</a></code> from within <code><a href="Codec-Archive-LibZip.html#t:Archive">Archive</a></code> monad.
</p></div></div><div class="top"><p class="src"><a name="v:fileContentsIx" class="def">fileContentsIx</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> a => [<a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a>] -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Codec-Archive-LibZip.html#t:Archive">Archive</a> [a]<a href="src/Codec-Archive-LibZip.html#fileContentsIx" class="link">Source</a></p><div class="doc"><p>Read entire file (referenced by position index). Shortcut for
<code><a href="Codec-Archive-LibZip.html#v:readContents">readContents</a></code> from within <code><a href="Codec-Archive-LibZip.html#t:Archive">Archive</a></code> monad.
</p></div></div><h1 id="g:4">Flags and options
</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:OpenFlag" class="def">OpenFlag</a> <a href="src/Codec-Archive-LibZip-Types.html#OpenFlag" class="link">Source</a></p><div class="doc"><p>Flags for opening an archive.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:CreateFlag" class="def">CreateFlag</a></td><td class="doc"><p>Create an archive if it does not exist.
</p></td></tr><tr><td class="src"><a name="v:ExclFlag" class="def">ExclFlag</a></td><td class="doc"><p>Error if the archive already exists.
</p></td></tr><tr><td class="src"><a name="v:CheckConsFlag" class="def">CheckConsFlag</a></td><td class="doc"><p>Check archive's consistency and error on failure.
</p></td></tr></table></div><div class="subs instances"><p id="control.i:OpenFlag" class="caption collapser" onclick="toggleSection('i:OpenFlag')">Instances</p><div id="section.i:OpenFlag" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> <a href="Codec-Archive-LibZip.html#t:OpenFlag">OpenFlag</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> <a href="Codec-Archive-LibZip.html#t:OpenFlag">OpenFlag</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> <a href="Codec-Archive-LibZip.html#t:OpenFlag">OpenFlag</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:FileFlag" class="def">FileFlag</a> <a href="src/Codec-Archive-LibZip-Types.html#FileFlag" class="link">Source</a></p><div class="doc"><p>Flags for accessing files in the archive.
Please consult <code>libzip</code> documentation about their use.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:FileNOCASE" class="def">FileNOCASE</a></td><td class="doc"><p>Ignore case on name lookup.
</p></td></tr><tr><td class="src"><a name="v:FileNODIR" class="def">FileNODIR</a></td><td class="doc"><p>Ignore directory component.
</p></td></tr><tr><td class="src"><a name="v:FileCOMPRESSED" class="def">FileCOMPRESSED</a></td><td class="doc"><p>Read the compressed data.
</p></td></tr><tr><td class="src"><a name="v:FileUNCHANGED" class="def">FileUNCHANGED</a></td><td class="doc"><p>Read the original data, ignore changes.
</p></td></tr><tr><td class="src"><a name="v:FileRECOMPRESS" class="def">FileRECOMPRESS</a></td><td class="doc"><p>Force recompression of data.
</p></td></tr><tr><td class="src"><a name="v:FileENCRYPTED" class="def">FileENCRYPTED</a></td><td class="doc"><p>Read encrypted data (implies FileCOMPRESSED).
</p></td></tr></table></div><div class="subs instances"><p id="control.i:FileFlag" class="caption collapser" onclick="toggleSection('i:FileFlag')">Instances</p><div id="section.i:FileFlag" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> <a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> <a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> <a href="Codec-Archive-LibZip.html#t:FileFlag">FileFlag</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ZipCompMethod" class="def">ZipCompMethod</a> <a href="src/Codec-Archive-LibZip-Types.html#ZipCompMethod" class="link">Source</a></p><div class="doc"><p>Compression methods.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:CompDEFAULT" class="def">CompDEFAULT</a></td><td class="doc"><p>Better of deflate or store.
</p></td></tr><tr><td class="src"><a name="v:CompSTORE" class="def">CompSTORE</a></td><td class="doc"><p>Stored (uncompressed).
</p></td></tr><tr><td class="src"><a name="v:CompSHRINK" class="def">CompSHRINK</a></td><td class="doc"><p>Shrunk.
</p></td></tr><tr><td class="src"><a name="v:CompREDUCE_1" class="def">CompREDUCE_1</a></td><td class="doc"><p>Reduced with factor 1
</p></td></tr><tr><td class="src"><a name="v:CompREDUCE_2" class="def">CompREDUCE_2</a></td><td class="doc"><p>Reduced with factor 2
</p></td></tr><tr><td class="src"><a name="v:CompREDUCE_3" class="def">CompREDUCE_3</a></td><td class="doc"><p>Reduced with factor 3
</p></td></tr><tr><td class="src"><a name="v:CompREDUCE_4" class="def">CompREDUCE_4</a></td><td class="doc"><p>Reduced with factor 4
</p></td></tr><tr><td class="src"><a name="v:CompIMPLODE" class="def">CompIMPLODE</a></td><td class="doc"><p>Imploded.
</p></td></tr><tr><td class="src"><a name="v:CompDEFLATE" class="def">CompDEFLATE</a></td><td class="doc"><p>Deflated.
</p></td></tr><tr><td class="src"><a name="v:CompDEFLATE64" class="def">CompDEFLATE64</a></td><td class="doc"><p>Deflate64.
</p></td></tr><tr><td class="src"><a name="v:CompPKWARE_IMPLODE" class="def">CompPKWARE_IMPLODE</a></td><td class="doc"><p>PKWARE imploding.
</p></td></tr><tr><td class="src"><a name="v:CompBZIP2" class="def">CompBZIP2</a></td><td class="doc"><p>Compressed using BZIP2 algorithm.
</p></td></tr><tr><td class="src"><a name="v:CompLZMA" class="def">CompLZMA</a></td><td class="doc"><p>LZMA (EFS)
</p></td></tr><tr><td class="src"><a name="v:CompTERSE" class="def">CompTERSE</a></td><td class="doc"><p>Compressed using IBM TERSE (new).
</p></td></tr><tr><td class="src"><a name="v:CompLZ77" class="def">CompLZ77</a></td><td class="doc"><p>IBM LZ77 z Architecture (PFS).
</p></td></tr><tr><td class="src"><a name="v:CompWAVPACK" class="def">CompWAVPACK</a></td><td class="doc"><p>WavPack compressed data.
</p></td></tr><tr><td class="src"><a name="v:CompPPMD" class="def">CompPPMD</a></td><td class="doc"><p>PPMd version I, Rev 1.
</p></td></tr></table></div><div class="subs instances"><p id="control.i:ZipCompMethod" class="caption collapser" onclick="toggleSection('i:ZipCompMethod')">Instances</p><div id="section.i:ZipCompMethod" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> <a href="Codec-Archive-LibZip.html#t:ZipCompMethod">ZipCompMethod</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> <a href="Codec-Archive-LibZip.html#t:ZipCompMethod">ZipCompMethod</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> <a href="Codec-Archive-LibZip.html#t:ZipCompMethod">ZipCompMethod</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ZipEncryptionMethod" class="def">ZipEncryptionMethod</a> <a href="src/Codec-Archive-LibZip-Types.html#ZipEncryptionMethod" class="link">Source</a></p><div class="doc"><p>Encryption methods.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:EncryptNONE" class="def">EncryptNONE</a></td><td class="doc"><p>Not encrypted.
</p></td></tr><tr><td class="src"><a name="v:EncryptTRAD_PKWARE" class="def">EncryptTRAD_PKWARE</a></td><td class="doc"><p>Traditional PKWARE encryption.
</p></td></tr><tr><td class="src"><a name="v:EncryptUNKNOWN" class="def">EncryptUNKNOWN</a></td><td class="doc"><p>Unknown algorithm.
</p></td></tr></table></div><div class="subs instances"><p id="control.i:ZipEncryptionMethod" class="caption collapser" onclick="toggleSection('i:ZipEncryptionMethod')">Instances</p><div id="section.i:ZipEncryptionMethod" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> <a href="Codec-Archive-LibZip.html#t:ZipEncryptionMethod">ZipEncryptionMethod</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> <a href="Codec-Archive-LibZip.html#t:ZipEncryptionMethod">ZipEncryptionMethod</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> <a href="Codec-Archive-LibZip.html#t:ZipEncryptionMethod">ZipEncryptionMethod</a></td><td class="doc empty"> </td></tr></table></div></div></div><h1 id="g:5">Exception handling
</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ZipError" class="def">ZipError</a> <a href="src/Codec-Archive-LibZip-Types.html#ZipError" class="link">Source</a></p><div class="doc"><p><code>libzip</code> error codes.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ErrOK" class="def">ErrOK</a></td><td class="doc"><p>No error.
</p></td></tr><tr><td class="src"><a name="v:ErrMULTIDISK" class="def">ErrMULTIDISK</a></td><td class="doc"><p>Multi-disk zip archives not supported.
</p></td></tr><tr><td class="src"><a name="v:ErrRENAME" class="def">ErrRENAME</a></td><td class="doc"><p>Renaming temporary file failed.
</p></td></tr><tr><td class="src"><a name="v:ErrCLOSE" class="def">ErrCLOSE</a></td><td class="doc"><p>Closing zip archive failed.
</p></td></tr><tr><td class="src"><a name="v:ErrSEEK" class="def">ErrSEEK</a></td><td class="doc"><p>Seek error.
</p></td></tr><tr><td class="src"><a name="v:ErrREAD" class="def">ErrREAD</a></td><td class="doc"><p>Read error.
</p></td></tr><tr><td class="src"><a name="v:ErrWRITE" class="def">ErrWRITE</a></td><td class="doc"><p>Write error.
</p></td></tr><tr><td class="src"><a name="v:ErrCRC" class="def">ErrCRC</a></td><td class="doc"><p>CRC error.
</p></td></tr><tr><td class="src"><a name="v:ErrZIPCLOSED" class="def">ErrZIPCLOSED</a></td><td class="doc"><p>Containing zip archive was closed.
</p></td></tr><tr><td class="src"><a name="v:ErrNOENT" class="def">ErrNOENT</a></td><td class="doc"><p>No such file.
</p></td></tr><tr><td class="src"><a name="v:ErrEXISTS" class="def">ErrEXISTS</a></td><td class="doc"><p>File already exists.
</p></td></tr><tr><td class="src"><a name="v:ErrOPEN" class="def">ErrOPEN</a></td><td class="doc"><p>Can't open file.
</p></td></tr><tr><td class="src"><a name="v:ErrTMPOPEN" class="def">ErrTMPOPEN</a></td><td class="doc"><p>Failure to create temporary file.
</p></td></tr><tr><td class="src"><a name="v:ErrZLIB" class="def">ErrZLIB</a></td><td class="doc"><p>Zlib error.
</p></td></tr><tr><td class="src"><a name="v:ErrMEMORY" class="def">ErrMEMORY</a></td><td class="doc"><p>Malloc error.
</p></td></tr><tr><td class="src"><a name="v:ErrCHANGED" class="def">ErrCHANGED</a></td><td class="doc"><p>Entry has been changed.
</p></td></tr><tr><td class="src"><a name="v:ErrCOMPNOTSUPP" class="def">ErrCOMPNOTSUPP</a></td><td class="doc"><p>Compression method not supported.
</p></td></tr><tr><td class="src"><a name="v:ErrEOF" class="def">ErrEOF</a></td><td class="doc"><p>Premature EOF.
</p></td></tr><tr><td class="src"><a name="v:ErrINVAL" class="def">ErrINVAL</a></td><td class="doc"><p>Invalid argument.
</p></td></tr><tr><td class="src"><a name="v:ErrNOZIP" class="def">ErrNOZIP</a></td><td class="doc"><p>Not a zip archive.
</p></td></tr><tr><td class="src"><a name="v:ErrINTERNAL" class="def">ErrINTERNAL</a></td><td class="doc"><p>Internal error.
</p></td></tr><tr><td class="src"><a name="v:ErrINCONS" class="def">ErrINCONS</a></td><td class="doc"><p>Zip archive inconsistent.
</p></td></tr><tr><td class="src"><a name="v:ErrREMOVE" class="def">ErrREMOVE</a></td><td class="doc"><p>Can't remove file.
</p></td></tr><tr><td class="src"><a name="v:ErrDELETED" class="def">ErrDELETED</a></td><td class="doc"><p>Entry has been deleted.
</p></td></tr><tr><td class="src"><a name="v:ErrENCRNOTSUPP" class="def">ErrENCRNOTSUPP</a></td><td class="doc"><p>Encryption method not supported.
</p></td></tr><tr><td class="src"><a name="v:ErrRDONLY" class="def">ErrRDONLY</a></td><td class="doc"><p>Read-only archive.
</p></td></tr><tr><td class="src"><a name="v:ErrNOPASSWD" class="def">ErrNOPASSWD</a></td><td class="doc"><p>No password provided.
</p></td></tr><tr><td class="src"><a name="v:ErrWRONGPASSWD" class="def">ErrWRONGPASSWD</a></td><td class="doc"><p>Wrong password provided.
</p></td></tr></table></div><div class="subs instances"><p id="control.i:ZipError" class="caption collapser" onclick="toggleSection('i:ZipError')">Instances</p><div id="section.i:ZipError" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> <a href="Codec-Archive-LibZip.html#t:ZipError">ZipError</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> <a href="Codec-Archive-LibZip.html#t:ZipError">ZipError</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> <a href="Codec-Archive-LibZip.html#t:ZipError">ZipError</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Codec-Archive-LibZip.html#t:ZipError">ZipError</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Control-Exception-Base.html#t:Exception">Exception</a> <a href="Codec-Archive-LibZip.html#t:ZipError">ZipError</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:catchZipError" class="def">catchZipError</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> a -> (<a href="Codec-Archive-LibZip.html#t:ZipError">ZipError</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> a) -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> a<a href="src/Codec-Archive-LibZip-Errors.html#catchZipError" class="link">Source</a></p><div class="doc"><p>Wrapper to catch library errors.
</p></div></div><h1 id="g:6">Re-exports
</h1><div class="top"><p class="src"><a name="v:lift" class="def">lift</a> :: MonadTrans t => <span class="keyword">forall</span> m a. <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Monad">Monad</a> m => m a -> t m a</p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.10.0</p></div></body></html>
|