protected function _scan($directory = null)
{
$realpath = realpath($directory);
/* use static cache */
if (array_key_exists($realpath, self::$_directoryCache)) {
$directoryArray = self::$_directoryCache[$realpath];
} else {
$directoryArray = scandir($directory);
self::$_directoryCache[$realpath] = $directoryArray;
}
$directoryArray = array_values(array_diff($directoryArray, $this->_excludeArray));
return $directoryArray;
}