Class: Gem::Package::TarWriter

Class | Gem::Package::TarWriter
In: | lib/rubygems/package/tar_writer.rb
Parent: | Object

Allows writing of tar files

### Methods

add_file add_file_simple check_closed close closed? flush mkdir new new

### Classes and Modules

Class Gem::Package::TarWriter::BoundedStream
Class Gem::Package::TarWriter::FileOverflow
Class Gem::Package::TarWriter::RestrictedStream

### Public Class methods

new(io)

Creates a new TarWriter that will write to `io`

new(io) {|writer| ...}

Creates a new TarWriter, yielding it if a block is given

### Public Instance methods

add_file(name, mode) {|io| ...}

Adds file `name` with permissions `mode`, and yields an IO for writing the file to

add_file_simple(name, mode, size) {|io| ...}

Add file `name` with permissions `mode` `size` bytes long. Yields an IO to write the file to.

check_closed()

Raises IOError if the TarWriter is closed

close()

Closes the TarWriter

closed?()

Is the TarWriter closed?

flush()

Flushes the TarWriter‘s IO

mkdir(name, mode)

Creates a new directory in the tar file `name` with `mode`

[Validate]