Method: Zip::ZipFile#commit

Defined in:
lib/pik/contrib/zip/zip.rb

#commitObject

Commits changes that has been made since the previous commit to the zip archive.



1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
# File 'lib/pik/contrib/zip/zip.rb', line 1474

def commit
 return if ! commit_required?
  on_success_replace(name) {
  |tmpFile|
  ZipOutputStream.open(tmpFile) {
    |zos|

    @entrySet.each { |e| e.write_to_zip_output_stream(zos) }
    zos.comment = comment
  }
  true
  }
  initialize(name)
end