Module: UtilityPack::Rar

Includes:
Win32
Defined in:
lib/utility_pack/rar.rb

Overview

Wrapper around the rar archiving and compression utility

Class Method Summary collapse

Class Method Details

.rar(archive_path, *paths) ⇒ Object

creates a rar archive for the specified files/directories archive_path - archive file that’ll be created *paths - files/directories to archive



9
10
11
# File 'lib/utility_pack/rar.rb', line 9

def self.rar archive_path, *paths
  CoreHelpers.s "rar a -m5 \"#{archive_path}\" " +paths.flatten.collect{|p| "\"#{p}\""}.join(' ')
end

.sfx(archive_path, *paths) ⇒ Object



13
14
15
# File 'lib/utility_pack/rar.rb', line 13

def self.sfx archive_path, *paths
  CoreHelpers.s "rar a -sfx \"#{archive_path}\" " +paths.flatten.collect{|p| "\"#{p}\""}.join(' ')
end