atrpo_po_files

Versions
6.1
atrpo_po_files($path)

Find all *.po files in a certain directory.

Parameters

$path The path from the Drupal root to the directory ATR should find strings in. Leading slashes are illegal. A trailing slash is required.

Return value

An array containing all *.po files (path and file name).

▾ 2 functions call atrpo_po_files()

atrpo_extract in atr/modules/atrpo/includes/atrpo.extract.inc
Extract strings from *.po files.
atrpo_po_files in atr/modules/atrpo/includes/atrpo.extract.inc
Find all *.po files in a certain directory.

Code

atr/modules/atrpo/includes/atrpo.extract.inc, line 40

<?php
function atrpo_po_files($path) {
  $files = glob($path . '*.po');

  // Grab subdirectories.
  $dirs = glob($path .'*', GLOB_ONLYDIR);
  if (is_array($dirs)) {
    foreach ($dirs as $dir) {
      if (!preg_match('#(^|.+/)(CVS|.svn|.git)$#', $dir)) {
        $files = array_merge($files, atrpo_po_files($dir . '/'));
      }
    }
  }

  return $files;
}
?>