/**
  * return a list of matching files and / or folders inside a given folder
  *
  * @param  FilesystemPathData $fsData
  *         the folder to look inside
  * @param  string $pattern
  *         the regex to match
  * @param  string $matcher
  *         class name of the matcher to apply to the RegexIterator results
  * @return array<string>
  *         a list of the matching files / folders found
  *         will be empty if no matches found
  */
 public static function fromFilesystemPathData(FilesystemPathData $fsData, $pattern, $matcher)
 {
     // make sure we have a folder
     if (!IsFolder::checkFilesystemPathData($fsData)) {
         return [];
     }
     // at this point, we are happy that we have a folder
     //
     // let's find out what's in it
     $regIter = SplFolderIterator::fromFilesystemPathData($fsData, $pattern);
     // what happened?
     $filenames = iterator_to_array(call_user_func_array([$matcher, 'fromRegexIterator'], [$regIter]));
     // let's get the list into some semblance of order
     sort($filenames);
     // all done
     return $filenames;
 }