function getfolders( $resourcetype, $currentfolder )
{
// map the virtual path to the local server path.
$sserverdir = servermapfolder( $resourcetype, $currentfolder, 'getfolders' ) ;
// array that will hold the folders names.
$afolders = array() ;
$ocurrentfolder = opendir( $sserverdir ) ;
while ( $sfile = readdir( $ocurrentfolder ) )
{
if ( $sfile != '.' && $sfile != '..' && is_dir( $sserverdir . $sfile ) )
$afolders[] = '' ;
}
closedir( $ocurrentfolder ) ;
// open the folders node.
echo ;
natcasesort( $afolders ) ;
foreach ( $afolders as $sfolder )
echo $sfolder ;
// close the folders node.
echo ;
}
