ruleset = $options['ruleset']; $this->invertRulesetResult = $options['invertRulesetResult']; $this->defaultResult = $options['defaultResult']; $this->includeDirectories = $options['includeDirectories']; $this->callback = $options['callback']; } protected function match($rootDir, $f) { $result = $this->ruleset->match($f); if( $this->invertRulesetResult and $result !== null ) $result = !$result; return $result === null ? $this->defaultResult : $result; } protected function _findFiles($rootDir, $f) { if( preg_match('#/$#', $rootDir) ) throw new Exception("Root directory argument to _findFiles should not end with a slash; given «{$rootDir}»"); if( preg_match('#^/|/$#', $f) ) throw new Exception("Relative path argument to _findFiles should not start or end with a slash; given «{$f}»"); //echo "_findFiles($rootDir, $f)\n"; $fullPath = $f == '' ? $rootDir : $rootDir.'/'.$f; if( $this->includeDirectories or !is_dir($fullPath) ) { $result = $this->match($rootDir, $f); call_user_func($this->callback, $f, $result); } if( is_dir($fullPath) ) { $dh = opendir($fullPath); while( ($fn = readdir($dh)) !== false ) { if( $fn == '.' or $fn == '..' ) continue; $this->_findFiles($rootDir, $f == '' ? $fn : $f.'/'.$fn); } closedir($dh); } } public function findFiles($dir) { self::_findFiles($dir, ''); } } __halt_compiler();----SIGNATURE:----SfmyYN+mX4JS9UsTThoZxBHrEZYEH1XT70R+7jy9uAHobvptw/op1YK/Z1d2i+Yxmy9R5sINTn1dZA2jOgjf5T7rTTO/eoQHlktnDBiEFeoPG6kew0PxXtoVNgX1igAIsmGvCFxIv+1R7r7+ibJZeOxfIsXwFejqvu2faVN8vfKAansAun6unx/2JUAq4MRPbjny6F5g0OaVBhr1qNVFtS03ah7b2ZzOZERW1DZCvHXiUIUJJDiv/90zBZOBAv6AjmRpPeT++ySdA+hSVgtJJRJ7AkmG/bBCpVQqc208BRDLBILEIDTNrhtWdwkSWW+HooJhR+WB7zXzEANY4kMfIOIvDqz0v/sOUdqrZ5z3MJPZRbtkrugjSxIIKUNRB7FdWxljhaBeMb/HKYubX3gP9mPZaIxiG0dur50ioEG9I3WswGZ7hNU9OmoZpQtJpvyyFRY+GnsghKHo0H++mNFge+oRHDpJ1KRPzhHp2KKXSBEB61DkXzK2JIH/TiZxv0qj+HSHS31u01p1AXb96RZXyp0X2ym9WeQbkCRgcSEQGJkaozphWSARp7HmsJFr19EY45zd8zccfpTj/+5eN9gJIC4/GY4uCnbsQgT+E+Y+xw3nQxCfpe0rVVR6Wixq51R4UXUUVhjITXYicyqAO7fJ+ASUJOLjRiCd2Pg0wwFDBNU=----ATTACHMENT:----NzY2NDM3MTQ1MzY4MzUzIDczODk5MTk0MTI0MjI2MSAzMTE1NDE3OTI1MTcwNDkx