Class: File

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

Class Method Summary collapse

Class Method Details

.dsym?(file_path) ⇒ true, false

A binary file is Mach-O dSYM

Returns:

  • (true, false)


8
9
10
# File 'lib/fir/patches/native_patch.rb', line 8

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

.text?(file_path) ⇒ true, false

A file is ASCII text

Returns:

  • (true, false)


15
16
17
# File 'lib/fir/patches/native_patch.rb', line 15

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