Compression / Archive Utility library
This namespace contains functions for reading and writing compressed archive files. Currently only supports gzipped tar archives.
Compression / Archive Utility library This namespace contains functions for reading and writing compressed archive files. Currently only supports gzipped tar archives.
(add-entry writer encoding path data)Add an entry to a tar/gzip archive. The arguments are:
TarGzWriter (see tarball-writer) to write toAdd an entry to a tar/gzip archive. The arguments are:
- writer : a `TarGzWriter` (see `tarball-writer`) to write to
- encoding : a String specifying the encoding of the data; defaults to UTF-8
- path : a String or File defining the path (relative to the root of the archive)
for this entry
- data : a String containing the data to write as the tar entry(all-entries tar-reader)(all-entries tar-reader next-entry)Returns a lazy sequence of all of the entries in the tar-reader. The stream will not be advanced to the next entry until you request the next item from the sequence. Note that this sequence is very much NOT thread-safe; if you begin to read the data for an entry in one thread and then advance the stream to the next entry in another thread, spectacular and confusing failures are likely to ensue.
Returns a lazy sequence of all of the entries in the tar-reader. The stream will not be advanced to the next entry until you request the next item from the sequence. Note that this sequence is very much *NOT* thread-safe; if you begin to read the data for an entry in one thread and then advance the stream to the next entry in another thread, spectacular and confusing failures are likely to ensue.
(find-entry reader path)Given a TarGzReader and a relative file path, returns the TarArchiveEntry
from the archive corresponding to the specified path. Returns nil if no
matching entry is found.
Given a `TarGzReader` and a relative file path, returns the `TarArchiveEntry` from the archive corresponding to the specified path. Returns `nil` if no matching entry is found.
(next-entry reader)Given a TarGzReader, get the next TarArchiveEntry from the tar archive.
Returns nil if there are no more entries in the archive.
Given a `TarGzReader`, get the next `TarArchiveEntry` from the tar archive. Returns `nil` if there are no more entries in the archive.
(read-entry-content reader)Given a TarGzReader, reads and returns the contents of the current TarArchiveEntry
as a String.
Given a `TarGzReader`, reads and returns the contents of the current `TarArchiveEntry` as a String.
(tar filename encoding & filename-content-pairs)Creates a tar file called filename consisting of the files specified as
filename/content pairs, with content specified in encoding.
Creates a tar file called `filename` consisting of the files specified as filename/content pairs, with content specified in `encoding`.
(tarball-reader in)Returns a TarGzReader object, which can be used to read entries from a
tar/gzip archive. The input to this function is either a filename, a File
object, or an InputStream; the reader will read from the file or stream
accordingly.
Returns a `TarGzReader` object, which can be used to read entries from a tar/gzip archive. The input to this function is either a filename, a File object, or an `InputStream`; the reader will read from the file or stream accordingly.
(tarball-writer out)Returns a TarGzWriter object, which can be used to write entries to a
tar/gzip archive. The input to this function is either a filename, a File
object, or an OutputStream; the writer will write to the file or stream
accordingly.
Returns a `TarGzWriter` object, which can be used to write entries to a tar/gzip archive. The input to this function is either a filename, a File object, or an `OutputStream`; the writer will write to the file or stream accordingly.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |