function _dirs($base, $path)
{
$base = Files::fixPath($base);
$dirs = array();
if ($this->isValidBase() == false) {
return $dirs;
}
$d = @dir($base);
while (false !== ($entry = $d->read())) {
//If it is a directory, and it doesn't start with
// a dot, and if is it not the thumbnail directory
if (is_dir($base . $entry) && substr($entry, 0, 1) != '.' && $this->isThumbDir($entry) == false) {
$relative = Files::fixPath($path . $entry);
$fullpath = Files::fixPath($base . $entry);
$dirs[$relative] = $fullpath;
$dirs = array_merge($dirs, $this->_dirs($fullpath, $relative));
}
}
$d->close();
return $dirs;
}