Liking cljdoc? Tell your friends :D

puppetlabs.puppetdb.archive

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.
raw docstring

add-entryclj

(add-entry writer encoding path data)

Add 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
Add 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
sourceraw docstring

all-entriesclj

(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.
sourceraw docstring

find-entryclj

(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.
sourceraw docstring

next-entryclj

(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.
sourceraw docstring

read-entry-contentclj

(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.
sourceraw docstring

tarclj

(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`.
sourceraw docstring

tarball-readerclj

(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.
sourceraw docstring

tarball-writerclj

(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.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close