Top Documents Download Gallery Repository
Are you looking for a Software Engineer? Check Here

48tar Module

The tar module provides measures to read/write TAR files. To utilize it, import the tar module using import function.

48.1tar.reader Class

48.1.1Function To Create Instance

tar.reader
tar.reader(stream:stream:r, compression?:symbol) {block?}
Reads a tar file from stream and returns a tar.reader instance that is to be used to read contents from the archive.

The argument compression specifies the compression format of the tar file and takes one of the following symbols:

48.1.2Method

tar.reader#entries
tar.reader#entries() {block?}
Creates an iterator that returns stream instances for each entry in the tar file.

48.2tar.writer Class

48.2.1Function To Create Instance

tar.writer
tar.writer(stream:stream:w, compression?:symbol) {block?}
Creates a tar file on stream and returns a tar.writer instance that is to be used to write contents to the archive.

The argument compression specifies the compression format of the tar file and takes one of the following symbols:

48.2.2Method

tar.writer#add
tar.writer#add(stream:stream:r, filename?:string):map:reduce
Adds an entry to the tar archive with a content from stream and a name of filename.

If the argument filename is omitted, an identifier associated with the stream would be used as the entry name.

tar.writer#close
tar.writer#close():reduce
Flushes all the unfinished writing processes and invalidates the tar.writer instance.

48.3Thanks

This module uses zlib and bzip2 library which are distributed in the following sites:


Copyright (C) 2011-2017 ypsitau