protected function findCheckCriteria($filepath, $criteria)
	{
		$match = true;
		$filename = basename($filepath);
		if ($match && isset($criteria['regexs'])) {
			if (!is_array($criteria['regexs'])) {
				$criteria['regexs'] = array($criteria['regexs']);
			}
			$match = false;
			foreach ($criteria['regexs'] as $regex) {
				if (preg_match($regex, $filename)) {
					$match = true;
					break;
				}
			}
		}
		if ($match && isset($criteria['mod_since'])) {
			$match = $criteria['mod_since'] < @filemtime($filepath);
		}
		if ($match && isset($criteria['mod_before'])) {
			$match = $criteria['mod_before'] > @filemtime($filepath);
		}
		if ($match && isset($criteria['contains'])) {
			$match = false;
			if (preg_match('/\.(.*?)$/', $filename, $matches)) {
				$extension = strtolower($matches[1]);
				if (in_array($extension, $criteria['search_extensions'])) {
					if ($contents = file_get_contents($filepath)) {
						$match = preg_match($criteria['contains'], $contents);
						unset($contents);
					}
				}
			}
		}
		return $match;
	}