protected function tnvExample_AddItems($strDirectory, $objParentItem = null)
{
$objDirectory = opendir($strDirectory);
if (!$objParentItem) {
$objParentItem = $this->tnvExample;
}
while ($strFilename = readdir($objDirectory)) {
if ($strFilename && $strFilename != '.' && $strFilename != '..' && $strFilename != 'configuration.inc.php' && $strFilename != 'configuration_pro.inc.php' && $strFilename != 'CVS') {
// Create the new TreeNavItem
$tniFile = new QTreeNavItem($strFilename, $strDirectory . '/' . $strFilename, false, $objParentItem);
// Recurse down the tree if we're at a directory
if (is_dir($strDirectory . '/' . $strFilename)) {
// We're currently looking at a directory -- make recursive call to go down the tree
$this->tnvExample_AddItems($strDirectory . '/' . $strFilename, $tniFile);
}
}
}
closedir($objDirectory);
}