# File lib/zip/zip_entry.rb, line 571 def write_file(destPath, continueOnExistsProc = proc { Zip.options[:continue_on_exists_proc] }) if ::File.exists?(destPath) && ! yield(self, destPath) raise ZipDestinationFileExistsError, "Destination '#{destPath}' already exists" end ::File.open(destPath, "wb") do |os| get_input_stream do |is| set_extra_attributes_on_path(destPath) buf = '' while buf = is.sysread(Decompressor::CHUNK_SIZE, buf) os << buf end end end end