Skip to content

Commit

Permalink
removed Tools::glob() (BC break; use Nette\Finder)
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Sep 15, 2010
1 parent 5acaef3 commit f379461
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions Nette/Utils/Tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,33 +101,6 @@ public static function defaultize(&$var, $default)



/**
* Recursive glob(). Finds pathnames matching a pattern.
* @param string
* @param int
* @return array
*/
public static function glob($pattern, $flags = 0)
{
// TODO: replace by RecursiveDirectoryIterator
$files = glob($pattern, $flags);
if (!is_array($files)) {
$files = array();
}

$dirs = glob(dirname($pattern) . '/*', $flags | GLOB_ONLYDIR);
if (is_array($dirs)) {
$mask = basename($pattern);
foreach ($dirs as $dir) {
$files = array_merge($files, self::glob($dir . '/' . $mask, $flags));
}
}

return $files;
}



/**
* Compares two values.
* @param mixed
Expand Down

0 comments on commit f379461

Please sign in to comment.