lib/zipr/archive.rb
def extract(destination_folder, files_to_extract: nil)
      raise "Unable to extract #{@path}! The file does not exist!" unless ::File.file?(@path)
      @options[:overwrite] = @mode != :if_missing
      files_to_extract = determine_files_to_extract(destination_folder, files_to_check: files_to_extract)

      case @options[:archive_type]
      when :zip
        _extract_zip(destination_folder, files_to_extract)
      when :seven_zip
        _extract_seven_zip(destination_folder, files_to_extract)
      end

      EasyIO.logger.info "Extracting #{::File.basename(@path)} finished." unless @options[:silent]
      [@checksum_path, update_checksum_file]
    end
#
# Description:
#   Extract files from an archive
# Returns:
#   Array of 2 objects: String path to the checksum file and the hash of known checksums for archive files.
# Parameters:
#   path: The full path to the archive being extracted.
#   destination_folder: The path where files will be extracted to.
#   files_to_extract: An array of files to be extracted from the archive. Relative paths should be used. If omitted, extracts all contents of the archive.
Extract files from an archive
Returns:
Array of 2 objects: String path to the checksum file and the hash of known checksums for archive files.
Parameters:
path: The full path to the archive being extracted.
destination_folder: The path where files will be extracted to.
files_to_extract: An array of files to be extracted from the archive. Relative paths should be used. If omitted, extracts all contents of the archive.
Extract files from an archive Returns : Array of 2 objects : String path to the checksum file and the hash of known checksums for archive files . Parameters : path : The full path to the archive being extracted . destination_folder : The path where files will be extracted to . files_to_extract : An array of files to be extracted from the archive . Relative paths should be used . If omitted extracts all contents of the archive .
def extract(destination_folder, files_to_extract: nil)
      raise "Unable to extract #{@path}! The file does not exist!" unless ::File.file?(@path)
      @options[:overwrite] = @mode != :if_missing
      files_to_extract = determine_files_to_extract(destination_folder, files_to_check: files_to_extract)
      case @options[:archive_type]
      when :zip
        _extract_zip(destination_folder, files_to_extract)
      when :seven_zip
        _extract_seven_zip(destination_folder, files_to_extract)
      end
      EasyIO.logger.info "Extracting #{::File.basename(@path)} finished." unless @options[:silent]
      [@checksum_path, update_checksum_file]
    end
def extract ( destination_folder , files_to_extract : nil ) raise "Unable to extract #{@path}! The file does not exist!" unless :: File . file? ( @path ) @options [ :overwrite ] = @mode != :if_missing files_to_extract = determine_files_to_extract ( destination_folder , files_to_check : files_to_extract ) case @options [ :archive_type ] when :zip _extract_zip ( destination_folder , files_to_extract ) when :seven_zip _extract_seven_zip ( destination_folder , files_to_extract ) end EasyIO . logger . info "Extracting #{::File.basename(@path)} finished." unless @options [ :silent ] [ @checksum_path , update_checksum_file ] end
Description:
Extract files from an archive
Returns:
Array of 2 objects: String path to the checksum file and the hash of known checksums for archive files.
Description : Extract files from an archive Returns : Array of 2 objects : String path to the checksum file and the hash of known checksums for archive files .
destination_folder
files_to_extract