Method: Chef::Provider::File#is_binary?

Defined in:
lib/chef/provider/file.rb

#is_binary?(path) ⇒ Boolean

Returns:



60
61
62
63
64
65
66
67
# File 'lib/chef/provider/file.rb', line 60

def is_binary?(path)
  ::File.open(path) do |file|

    buff = file.read(Chef::Config[:diff_filesize_threshold])
    buff = "" if buff.nil?
    return buff !~ /^[\r[:print:]]*$/
  end
end