File: write_simple.rb

package info (click to toggle)
ruby-zip 2.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,192 kB
  • sloc: ruby: 8,386; makefile: 23
file content (10 lines) | stat: -rwxr-xr-x 170 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env ruby

$LOAD_PATH << '../lib'

require 'zip'

::Zip::OutputStream.open('simple.zip') do |zos|
  zos.put_next_entry 'entry.txt'
  zos.puts 'Hello world'
end