Class: File
- Inherits:
-
Object
- Object
- File
- Defined in:
- lib/proutils/rtar/rtar.rb
Class Method Summary collapse
-
.gzip?(file) ⇒ Boolean
Is a file a gzip file?.
Class Method Details
.gzip?(file) ⇒ Boolean
Is a file a gzip file?
38 39 40 41 42 43 44 |
# File 'lib/proutils/rtar/rtar.rb', line 38 def self.gzip?( file ) File.open(file,'rb') { |f| return false unless f.getc == 0x1f return false unless f.getc == 0x8b } true end |