module GrenFileTest
Constants
- IGNORE_DIR
- IGNORE_FILE
Public Class Methods
binary?(fpath)
click to toggle source
# File lib/milkode/common/grenfiletest.rb, line 24 def self.binary?(fpath) s = File.read(fpath, 1024) or return false return s.index("\x00") end
ignoreDir?(fpath)
click to toggle source
# File lib/milkode/common/grenfiletest.rb, line 6 def self.ignoreDir?(fpath) begin IGNORE_DIR.match(File.basename(fpath)) rescue ArgumentError => e puts "[skip dir] #{fpath}: #{e.to_s}" true end end
ignoreFile?(fpath)
click to toggle source
# File lib/milkode/common/grenfiletest.rb, line 15 def self.ignoreFile?(fpath) begin IGNORE_FILE.match(File.basename(fpath)) rescue ArgumentError => e puts "[skip] #{fpath}: #{e.to_s}" true end end