Sha256: a178c3f970af183221eb217b7c957e852ffb06a9f388a431c0f53379b0718965

Contents?: true

Size: 189 Bytes

Versions: 38

Compression:

Stored size: 189 Bytes

Contents

class File
  # from ptools
  def self.binary?(file)
    s = (File.read(file, File.stat(file).blksize) || "").split(//)
    ((s.size - s.grep(" ".."~").size) / s.size.to_f) > 0.30
  end
end

Version data entries

38 entries across 36 versions & 4 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fission-0.5.0/lib/fission/core_ext/file.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fission-0.5.0/lib/fission/core_ext/file.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fission-0.5.0/lib/fission/core_ext/file.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fission-0.5.0/lib/fission/core_ext/file.rb
veewee-0.5.0.alpha4 lib/fission.old/core_ext/file.rb
veewee-0.5.0.alpha3 lib/fission.old/core_ext/file.rb
veewee-0.5.0.alpha2 lib/fission.old/core_ext/file.rb
veewee-0.5.0.alpha1 lib/fission.old/core_ext/file.rb
veewee-0.4.5.1 lib/fission.old/core_ext/file.rb
veewee-0.4.5 lib/fission.old/core_ext/file.rb
veewee-0.4.5.pre1 lib/fission.old/core_ext/file.rb
veewee-0.4.4 lib/fission.old/core_ext/file.rb
veewee-0.4.3 lib/fission.old/core_ext/file.rb
veewee-0.4.2 lib/fission.old/core_ext/file.rb
veewee-0.4.1 lib/fission.old/core_ext/file.rb
veewee-0.4.0 lib/fission.old/core_ext/file.rb
veewee-0.3.12 lib/fission.old/core_ext/file.rb
veewee-0.3.11 lib/fission.old/core_ext/file.rb
veewee-0.3.10 lib/fission.old/core_ext/file.rb
veewee-0.3.9 lib/fission.old/core_ext/file.rb