ext/**.civix.php - Remove _civix_find_files(). Not used anymore.
[civicrm-core.git] / ext / flexmailer / flexmailer.civix.php
index 7fbacec16b1e68a92e392ebda085ce43d490d212..17e77fb257ea7240d4d6d8b2ba07f1a38e64eb31 100644 (file)
@@ -204,46 +204,6 @@ function _flexmailer_civix_upgrader() {
   }
 }
 
-/**
- * Search directory tree for files which match a glob pattern.
- *
- * Note: Dot-directories (like "..", ".git", or ".svn") will be ignored.
- * Note: In Civi 4.3+, delegate to CRM_Utils_File::findFiles()
- *
- * @param string $dir base dir
- * @param string $pattern , glob pattern, eg "*.txt"
- *
- * @return array(string)
- */
-function _flexmailer_civix_find_files($dir, $pattern) {
-  if (is_callable(['CRM_Utils_File', 'findFiles'])) {
-    return CRM_Utils_File::findFiles($dir, $pattern);
-  }
-
-  $todos = [$dir];
-  $result = [];
-  while (!empty($todos)) {
-    $subdir = array_shift($todos);
-    foreach (_flexmailer_civix_glob("$subdir/$pattern") as $match) {
-      if (!is_dir($match)) {
-        $result[] = $match;
-      }
-    }
-    if ($dh = opendir($subdir)) {
-      while (FALSE !== ($entry = readdir($dh))) {
-        $path = $subdir . DIRECTORY_SEPARATOR . $entry;
-        if ($entry[0] == '.') {
-        }
-        elseif (is_dir($path)) {
-          $todos[] = $path;
-        }
-      }
-      closedir($dh);
-    }
-  }
-  return $result;
-}
-
 /**
  * Glob wrapper which is guaranteed to return an array.
  *