Path  Archive::Tar::Minitar::Writer::BoundedStream

Methods

Generated with Razzle Dazzle Redfish

[Validate]

BoundedStream

A RestrictedStream that also has a size limit.

Attributes

limit[R]

The maximum number of bytes that may be written to this data stream.

written[R]

The current total number of bytes written to this data stream.

Public Class Methods

new(io, limit) click to toggle source

(Not documented)

# File vendor/path/minitar.rb, line 272
      def initialize(io, limit)
        @io       = io
        @limit    = limit
        @written  = 0
      end

Public Instance Methods

write(data) click to toggle source

(Not documented)

# File vendor/path/minitar.rb, line 278
      def write(data)
        raise FileOverflow if (data.size + @written) > @limit
        @io.write(data)
        @written += data.size
        data.size
      end

Disabled; run with --debug to generate this.