Class: File

Inherits:
Object show all
Defined in:
lib/fir/patches/native_patch.rb

Class Method Summary collapse

Class Method Details

.is_dsym?(file_path) ⇒ true, false

A binary file is Mach-O dSYM

Returns:

  • (true, false)


207
208
209
# File 'lib/fir/patches/native_patch.rb', line 207

def is_dsym? file_path
  !!(`file -b #{file_path}` =~ /dSYM/)
end

.is_txt?(file_path) ⇒ true, false

A file is ASCII text

Returns:

  • (true, false)


214
215
216
# File 'lib/fir/patches/native_patch.rb', line 214

def is_txt? file_path
  !!(`file -b #{file_path}` =~ /text/)
end