Sha256: 328f51bd633b3325e8ddfb72ccbc612d310bd4e75f2f0af5154c566b05aeaaeb

Contents?: true

Size: 442 Bytes

Versions: 46

Compression:

Stored size: 442 Bytes

Contents

# -*- coding: utf-8 -*-

module GrenFileTest
  IGNORE_FILE = /(\A#.*#\Z)|(~\Z)|(\A\.#)|(\.d\Z)|(\.map\Z)|(\.MAP\Z)/
  IGNORE_DIR = /(\A\.svn\Z)|(\A\.git\Z)|(\ACVS\Z)/

  def self.ignoreDir?(fpath)
    IGNORE_DIR.match(File.basename(fpath))
  end

  def self.ignoreFile?(fpath)
    IGNORE_FILE.match(File.basename(fpath))
  end

  def self.binary?(fpath)
      s = File.read(fpath, 1024) or return false
      return s.index("\x00")
  end
end

Version data entries

46 entries across 46 versions & 3 rubygems

Version Path
gren-1.0.0 lib/gren/common/grenfiletest.rb
milkode-0.9.2 lib/milkode/common/grenfiletest.rb
milkode-0.9.1.1 lib/milkode/common/grenfiletest.rb
milkode-0.9.1 lib/milkode/common/grenfiletest.rb
milkode-0.9.0 lib/milkode/common/grenfiletest.rb
milkode-0.8.1 lib/milkode/common/grenfiletest.rb
milkode-0.8.0 lib/milkode/common/grenfiletest.rb
milkode-0.7.1 lib/milkode/common/grenfiletest.rb
milkode-0.7.0 lib/milkode/common/grenfiletest.rb
milkode-0.6.3 lib/milkode/common/grenfiletest.rb
milkode-0.6.2 lib/milkode/common/grenfiletest.rb
milkode-0.6.1 lib/milkode/common/grenfiletest.rb
milkode-0.6.0 lib/milkode/common/grenfiletest.rb
milkode-0.5.3 lib/milkode/common/grenfiletest.rb
milkode-0.5.2 lib/milkode/common/grenfiletest.rb
milkode-0.5.1 lib/milkode/common/grenfiletest.rb
milkode-0.5.0 lib/milkode/common/grenfiletest.rb
milkode-0.4.0 lib/milkode/common/grenfiletest.rb
milkode-0.3.0 lib/milkode/common/grenfiletest.rb
milkode-0.2.9 lib/milkode/common/grenfiletest.rb