library/core/class.filesystem.php
public static function Folders($SourceFolders) {
      if(!is_array($SourceFolders))
         $SourceFolders = array($SourceFolders);
   
      $BlackList = Gdn::Config('Garden.FolderBlacklist');
      if (!is_array($BlackList))
         $BlackList = array('.', '..');
         
      $Result = array();
      
      foreach($SourceFolders as $SourceFolder) {
         if ($DirectoryHandle = opendir($SourceFolder)) {
            while (($Item = readdir($DirectoryHandle)) !== FALSE) {
               $SubFolder = CombinePaths(array($SourceFolder, $Item));
               if (!in_array($Item, $BlackList) && is_dir($SubFolder))
                  $Result[] = $Item;
            }
            closedir($DirectoryHandle);
         }
      }
      if(count($Result) == 0)
         return FALSE;
      return $Result;
   }
public static function Folders($SourceFolders) {
      if(!is_array($SourceFolders))
         $SourceFolders = array($SourceFolders);
   
      $BlackList = Gdn::Config('Garden.FolderBlacklist');
      if (!is_array($BlackList))
         $BlackList = array('.', '..');
         
      $Result = array();
      
      foreach($SourceFolders as $SourceFolder) {
         if ($DirectoryHandle = opendir($SourceFolder)) {
            while (($Item = readdir($DirectoryHandle)) !== FALSE) {
               $SubFolder = CombinePaths(array($SourceFolder, $Item));
               if (!in_array($Item, $BlackList) && is_dir($SubFolder))
                  $Result[] = $Item;
            }
            closedir($DirectoryHandle);
         }
      }
      if(count($Result) == 0)
         return FALSE;
      return $Result;
   }
public static function Folders ( $ SourceFolders ) { if ( ! is_array ( $ SourceFolders ) ) $ SourceFolders = array ( $ SourceFolders ) ; $ BlackList = Gdn :: Config ( 'Garden.FolderBlacklist' ) ; if ( ! is_array ( $ BlackList ) ) $ BlackList = array ( '.' , '..' ) ; $ Result = array ( ) ; foreach ( $ SourceFolders as $ SourceFolder ) { if ( $ DirectoryHandle = opendir ( $ SourceFolder ) ) { while ( ( $ Item = readdir ( $ DirectoryHandle ) ) !== FALSE ) { $ SubFolder = CombinePaths ( array ( $ SourceFolder , $ Item ) ) ; if ( ! in_array ( $ Item , $ BlackList ) && is_dir ( $ SubFolder ) ) $ Result [ ] = $ Item ; } closedir ( $ DirectoryHandle ) ; } } if ( count ( $ Result ) == 0 ) return FALSE ; return $ Result ; }
Returns an array of all folder names within the source folder or FALSE
if SourceFolder does not exist.

@param string $SourceFolder
@todo Documentation and variable type is needed for $SourceFolder.
Returns an array of all folder names within the source folder or FALSE if SourceFolder does not exist .