|
Codec.Archive.Zip | Portability | so far only tested on GHC | Stability | unstable | Maintainer | John MacFarlane < jgm at berkeley dot edu > |
|
|
|
|
|
Description |
The zip-archive library provides functions for creating, modifying,
and extracting files from zip archives.
Certain simplifying assumptions are made about the zip archives: in
particular, there is no support for encryption, zip files that span
multiple disks, ZIP64, OS-specific file attributes, or compression
methods other than Deflate. However, the library should be able to
read the most common zip archives, and the archives it produces should
be readable by all standard unzip programs.
As an example of the use of the library, a standalone zip archiver
and extracter, Zip.hs, is provided in the source distribution.
For more information on the format of zip archives, consult
http://www.pkware.com/documents/casestudies/APPNOTE.TXT
|
|
Synopsis |
|
|
|
|
Data structures
|
|
|
Structured representation of a zip archive, including directory
information and contents (in lazy bytestrings).
| Constructors | |
|
|
|
Representation of an archived file, including content and metadata.
| Constructors | Entry | | eRelativePath :: FilePath | Relative path, using / as separator
| eCompressionMethod :: CompressionMethod | Compression method
| eLastModified :: Integer | Modification time (seconds since unix epoch)
| eCRC32 :: Word32 | CRC32 checksum
| eCompressedSize :: Word32 | Compressed size in bytes
| eUncompressedSize :: Word32 | Uncompressed size in bytes
| eExtraField :: ByteString | Extra field - unused by this library
| eFileComment :: ByteString | File comment - unused by this library
| eInternalFileAttributes :: Word16 | Internal file attributes - unused by this library
| eExternalFileAttributes :: Word32 | External file attributes (system-dependent)
| eCompressedData :: ByteString | Compressed contents of file
|
|
|
|
|
|
Compression methods.
| Constructors | |
|
|
|
|
|
|
A zip archive with no contents.
|
|
Pure functions for working with zip archives
|
|
|
Reads an Archive structure from a raw zip archive (in a lazy bytestring).
|
|
|
Writes an Archive structure to a raw zip archive (in a lazy bytestring).
|
|
|
Returns a list of files in a zip archive.
|
|
|
Adds an entry to a zip archive, or updates an existing entry.
|
|
|
Deletes an entry from a zip archive.
|
|
|
Returns Just the zip entry with the specified path, or Nothing.
|
|
|
Returns uncompressed contents of zip entry.
|
|
|
:: FilePath | File path for entry
| -> Integer | Modification time for entry (seconds since unix epoch)
| -> ByteString | Contents of entry
| -> Entry | | Create an Entry with specified file path, modification time, and contents.
|
|
|
IO functions for working with zip archives
|
|
|
Generates a Entry from a file or directory.
|
|
|
Writes contents of an Entry to a file.
|
|
|
Add the specified files to an Archive. If OptRecursive is specified,
recursively add files contained in directories. If OptVerbose is specified,
print messages to stderr.
|
|
|
Extract all files from an Archive, creating directories
as needed. If OptVerbose is specified, print messages to stderr.
Note that the last-modified time is set correctly only in POSIX,
not in Windows.
|
|
Produced by Haddock version 2.6.0 |