D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
td-agent
/
embedded
/
lib
/
ruby
/
gems
/
2.1.0
/
gems
/
rubyzip-1.1.7
/
samples
/
Filename :
write_simple.rb
back
Copy
#!/usr/bin/env ruby $: << "../lib" require 'zip' include Zip OutputStream.open('simple.zip') { |zos| ze = zos.put_next_entry 'entry.txt' zos.puts "Hello world" }