Helper to determine if a filename is excluded according to the exclude configuration parameter.

 @return [Boolean]
180658
def excluded?(filename)
      exclude.each do |f|
        f += '**/*' if f.end_with? '/'
        return true if File.fnmatch(f, filename, File::FNM_EXTGLOB | File::FNM_PATHNAME)
      end
      false
    end
263815
def should_have_attached_file name
      klass   = self.name.gsub(/Test$/, '').constantize
      matcher = have_attached_file name
      should matcher.description do
        assert_accepts(matcher, klass)
      end
    end
556238
def is_excluded(self):
        '''
        
        '''
        exclude = self.app and self.app.config['exclude_fnc']
        return exclude and exclude(self.path)
75155
def canProcessFilename(cls, filename):
        
        supported_patterns = cls._extpattern_to_mime.keys()
        for pattern in supported_patterns:
            if fnmatch.fnmatch(filename, pattern):
                return True
        return False
1283942
def ignore_path?(action, options)
        options[:except].present? &&  options[:except].include?(action) and return true
        options[:only].present?   && !options[:only].include?(action)   and return true
        false
      end
310754
def exclude?(path)
      exclude.include?(path) ||
        exclude.include?(path.split(METHOD_SEPARATOR).first)
    end
761893
def parse_files
      @parse_files ||= begin
        files = expand_dirs_to_files(@path)
        files = file_sort(files)

        if @options['only'].present?
          files = file_accept(files, @options['only'])
        end

        # By default, tmp, vender, spec, test, features are ignored.
        %w[vendor spec test features tmp].each do |dir|
          files = file_ignore(files, File.join(@path, dir)) unless @options[dir]
        end

        # Exclude files based on exclude regexes if the option is set.
        @options['exclude'].each do |pattern|
          files = file_ignore(files, pattern)
        end

        %w[Capfile Gemfile Gemfile.lock].each do |file|
          files.unshift File.join(@path, file)
        end

        files.compact
      end
    end
821249
public static function ignoreDir($fileName) {
		$id = Config::getOption("id");
		foreach ($id as $dir) {
			$pos = strpos(DIRECTORY_SEPARATOR.$fileName,DIRECTORY_SEPARATOR.$dir.DIRECTORY_SEPARATOR);
			if ($pos !== false) {
				return true;
			}
		}
		return false;
	}
769574
function filenameInclude(filename, exclude, include) { // eslint-disable-line
  var output = true; // eslint-disable-line

  if (exclude) {
    if (globToRegExp(exclude, { extended: true }).test(filename)
    && !globToRegExp(include || '', { extended: true }).test(filename)) {
      output = false;
    }
  }

  return output;
}
1284422
public function allows($file_name, $case_sensitive = false)
    {
        if ($this->inclusive) {
            foreach ($this->directories as $include_dir) {
                if ($case_sensitive) {
                    if (strpos($file_name, $include_dir) === 0) {
                        return true;
                    }
                } else {
                    if (stripos($file_name, $include_dir) === 0) {
                        return true;
                    }
                }
            }

            if ($case_sensitive) {
                if (in_array($file_name, $this->files, true)) {
                    return true;
                }
            } else {
                if (in_array(strtolower($file_name), $this->files_lowercase, true)) {
                    return true;
                }
            }

            return false;
        }

        // exclusive
        foreach ($this->directories as $exclude_dir) {
            if ($case_sensitive) {
                if (strpos($file_name, $exclude_dir) === 0) {
                    return false;
                }
            } else {
                if (stripos($file_name, $exclude_dir) === 0) {
                    return false;
                }
            }
        }

        if ($case_sensitive) {
            if (in_array($file_name, $this->files, true)) {
                return false;
            }
        } else {
            if (in_array(strtolower($file_name), $this->files_lowercase, true)) {
                return false;
            }
        }

        return true;
    }
107108
def init
      File.exist?(EXCLUDE_FILE) ? @logger.info('skip: creation excludes.d') : create_exclude_config
      Dir.exist?(ROLE_DIR) ? @logger.info('skip: creation roles.d') : create_roles_dir
      Dir.exist?(USER_DIR) ? @logger.info('skip: creation users.d') : create_users_dir
    end
1219441
def _is_excluded(self, path, dir_only):
        """"""

        return self.npatterns and self._match_excluded(path, self.npatterns)
1103540
def exclude_specs(full, to_be_excluded)
      full.clone.delete_if { |s| to_be_excluded.find { |d| s.name == d.name } }
    end
172087
def _is_excluded(filename, exclusions):
    """"""
    for exclusion in exclusions:
        if fnmatch(filename, exclusion):
            return True

    return False
61900
def excluded_file?(file)
      full_path = File.expand_path(file)
      options.fetch(:excluded_files) { [] }.any? do |file_to_exclude|
        File.fnmatch(file_to_exclude, full_path)
      end
    end
458718
def _get_exclude_samples(in_file, to_exclude):
    
    include, exclude = [], []
    to_exclude = set(to_exclude)
    for s in get_samples(in_file):
        if s in to_exclude:
            exclude.append(s)
        else:
            include.append(s)
    return include, exclude
127051
def remove filename
      return false unless source_hash.key?(filename)
      source_hash.delete filename
      true
    end