/**
  * Matches a path against a pattern.
  *
  * @param string $pattern        the (non-null) pattern to match against
  * @param string $str            the (non-null) string (path) to match
  * @param bool $isCaseSensitive  must a case sensitive match be done?
  *
  * @return bool true when the pattern matches against the string.
  *              false otherwise.
  */
 public function matchPath($pattern, $str, $isCaseSensitive = true)
 {
     return SelectorUtils::matchPath($pattern, $str, $isCaseSensitive);
 }
 /**
  * The heart of the matter. This is where the selector gets to decide
  * on the inclusion of a file in a particular fileset. Most of the work
  * for this selector is offloaded into SelectorUtils, a static class
  * that provides the same services for both FilenameSelector and
  * DirectoryScanner.
  *
  * @param basedir the base directory the scan is being done from
  * @param filename is the name of the file to check
  * @param file is a PhingFile object the selector can use
  * @return whether the file should be selected or not
  */
 public function isSelected(PhingFile $basedir, $filename, PhingFile $file) {
     $this->validate();
     return (SelectorUtils::matchPath($this->pattern, $filename, $this->casesensitive)
         === !($this->negated));
 }