class Utils::Finder

def attempt_match?(path)

def attempt_match?(path)
  stat = File.stat(path)
  stat.symlink? and stat = File.lstat(path)
  if @only_directory
    stat.directory?
  elsif @directory
    stat.directory? || stat.file? && (stat.size == 0 || File.ascii?(path))
  else
    stat.file? && (stat.size == 0 || File.ascii?(path))
  end
rescue SystemCallError => e
  warn "Caught #{e.class}: #{e}"
  nil
end