src/FileInfo.php
public function match($include = '', $exclude = '')
    {
        $extract = true;
        if ($include && !preg_match($include, $this->getPath())) {
            $extract = false;
        }
        if ($exclude && preg_match($exclude, $this->getPath())) {
            $extract = false;
        }

        return $extract;
    }
public function match($include = '', $exclude = '')
    {
        $extract = true;
        if ($include && !preg_match($include, $this->getPath())) {
            $extract = false;
        }
        if ($exclude && preg_match($exclude, $this->getPath())) {
            $extract = false;
        }

        return $extract;
    }
public function match ( $ include = '' , $ exclude = '' ) { $ extract = true ; if ( $ include && ! preg_match ( $ include , $ this -> getPath ( ) ) ) { $ extract = false ; } if ( $ exclude && preg_match ( $ exclude , $ this -> getPath ( ) ) ) { $ extract = false ; } return $ extract ; }
Does the file match the given include and exclude expressions?

Exclude rules take precedence over include rules

@param string $include Regular expression of files to include
@param string $exclude Regular expression of files to exclude
@return bool
Does the file match the given include and exclude expressions?