add_file_simple (Archive::Tar::Minitar::Writer)

         # File lib/archive/tar/minitar.rb, line 325
    325:     def add_file_simple(name, opts = {}) # :yields BoundedStream:
    326:       raise Archive::Tar::Minitar::BlockRequired unless block_given?
    327:       raise Archive::Tar::ClosedStream if @closed
    328:
    329:       name, prefix = split_name(name)
    330:
    331:       header = { :name => name, :mode => opts[:mode], :mtime => opts[:mtime],
    332:         :size => opts[:size], :gid => opts[:gid], :uid => opts[:uid],
    333:         :prefix => prefix }
    334:       header = Archive::Tar::PosixHeader.new(header).to_s
    335:       @io.write(header)
    336:
    337:       os = BoundedStream.new(@io, opts[:size])
    338:       yield os
    339:         # FIXME: what if an exception is raised in the block?
    340:
    341:       min_padding = opts[:size] - os.written
    342:       @io.write("\0" * min_padding)
    343:       remainder = (512 - (opts[:size] % 512)) % 512
    344:       @io.write("\0" * remainder)
    345:     end