Sha256: 51940a7f50fbce59c22e1496035e02d16a5f411e4106fb4cbbb89df20c40f6fe
Contents?: true
Size: 559 Bytes
Versions: 8
Compression:
Stored size: 559 Bytes
Contents
require 'furoshiki/zip/recursive' module Furoshiki module Zip class DirectoryContents # @param [#to_s] input_dir the directory to zip # @param [#to_s] output_file the location of the output archive def initialize(input_dir, output_file) @input_dir = Pathname.new(input_dir) @zip = Recursive.new(output_file) end # Zip the contents of the input directory, without the root. def write entries = @input_dir.children(false) @zip.write entries, @input_dir, '' end end end end
Version data entries
8 entries across 8 versions & 1 rubygems