Module: Ronin::Support::Archive::Mixin
- Defined in:
- lib/ronin/support/archive/mixin.rb
Overview
Provides helper methods for reading/writing archives.
Instance Method Summary collapse
-
#tar(path) {|tar| ... } ⇒ Tar::Writer
Opens the tar file for writing.
-
#tar_open(path, mode: 'r') {|tar| ... } ⇒ Tar::Writer
Opens a tar file for reading or writing.
-
#tar_stream(io, mode: 'r') {|tar| ... } ⇒ Tar::Reader, Tar::Writer
Creates a tar stream around the IO object.
-
#untar(path) {|tar| ... } ⇒ Tar::Reader
Opens the tarped file for reading.
-
#unzip(path) {|zip| ... } ⇒ Zip::Reader
Opens the zipped file for reading.
-
#zip(path) {|zip| ... } ⇒ Zip::Writer
Opens the zip file for writing.
-
#zip_open(path, mode: 'r') {|zip| ... } ⇒ Zip::Writer
Opens a zip file for reading or writing.
Instance Method Details
#tar(path) {|tar| ... } ⇒ Tar::Writer
Opens the tar file for writing.
132 133 134 |
# File 'lib/ronin/support/archive/mixin.rb', line 132 def tar(path,&block) Archive.tar(path,&block) end |
#tar_open(path, mode: 'r') {|tar| ... } ⇒ Tar::Writer
Opens a tar file for reading or writing.
86 87 88 |
# File 'lib/ronin/support/archive/mixin.rb', line 86 def tar_open(path, mode: 'r', &block) Archive.tar_open(path, mode: mode, &block) end |
#tar_stream(io, mode: 'r') {|tar| ... } ⇒ Tar::Reader, Tar::Writer
Creates a tar stream around the IO object.
57 58 59 |
# File 'lib/ronin/support/archive/mixin.rb', line 57 def tar_stream(io, mode: 'r', &block) Archive.tar_stream(io, mode: mode, &block) end |
#untar(path) {|tar| ... } ⇒ Tar::Reader
Opens the tarped file for reading.
109 110 111 |
# File 'lib/ronin/support/archive/mixin.rb', line 109 def untar(path,&block) Archive.untar(path,&block) end |
#unzip(path) {|zip| ... } ⇒ Zip::Reader
Opens the zipped file for reading.
184 185 186 |
# File 'lib/ronin/support/archive/mixin.rb', line 184 def unzip(path,&block) Archive.unzip(path,&block) end |
#zip(path) {|zip| ... } ⇒ Zip::Writer
Opens the zip file for writing.
207 208 209 |
# File 'lib/ronin/support/archive/mixin.rb', line 207 def zip(path,&block) Archive.zip(path,&block) end |
#zip_open(path, mode: 'r') {|zip| ... } ⇒ Zip::Writer
Opens a zip file for reading or writing.
161 162 163 |
# File 'lib/ronin/support/archive/mixin.rb', line 161 def zip_open(path, mode: 'r', &block) Archive.zip_open(path, mode: mode, &block) end |