Sha256: 58c897e901c3601174716d90d5819cfcd759e194df9f6c171781d59fcdb376f3

Contents?: true

Size: 498 Bytes

Versions: 25

Compression:

Stored size: 498 Bytes

Contents

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

module GrenFileTest
  IGNORE_FILE = /(\A#.*#\Z)|(~\Z)|(\A\.#)|(\.d\Z)|(\.map\Z)|(\.MAP\Z)|(\.xbm\Z)|(\.ppm\Z)|(\.ai\Z)|(\.png\Z)|(\.webarchive\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

25 entries across 25 versions & 2 rubygems

Version Path
milkode-1.8.2 lib/milkode/common/grenfiletest.rb
milkode-1.8.1 lib/milkode/common/grenfiletest.rb
milkode-1.8.0 lib/milkode/common/grenfiletest.rb
milkode-1.7.1 lib/milkode/common/grenfiletest.rb
milkode-1.7.0 lib/milkode/common/grenfiletest.rb
milkode-1.6.1 lib/milkode/common/grenfiletest.rb
milkode-1.6.0 lib/milkode/common/grenfiletest.rb
milkode-1.5.0 lib/milkode/common/grenfiletest.rb
milkode-1.4.0 lib/milkode/common/grenfiletest.rb
milkode-1.3.0 lib/milkode/common/grenfiletest.rb
milkode-1.2.0 lib/milkode/common/grenfiletest.rb
milkode-1.1.0 lib/milkode/common/grenfiletest.rb
milkode-1.0.2 lib/milkode/common/grenfiletest.rb
milkode-1.0.0 lib/milkode/common/grenfiletest.rb
milkode-0.9.9.9 lib/milkode/common/grenfiletest.rb
gren-1.0.2 lib/gren/common/grenfiletest.rb
gren-1.0.1 lib/gren/common/grenfiletest.rb
milkode-0.9.9 lib/milkode/common/grenfiletest.rb
milkode-0.9.8 lib/milkode/common/grenfiletest.rb
milkode-0.9.7 lib/milkode/common/grenfiletest.rb