API17:JFolder::folders
From Joomla! Documentation
JFolder::folders
Description
Utility function to read the folders in a folder.
public static function folders (
$path
$filter= '.'
$recurse=false
$full=false
$exclude=array('.svn'
'CVS'
'.DS_Store'
'__MACOSX'
$excludefilter=array('^\..*'
)
| Parameter | Type | Default | Description |
|---|---|---|---|
| $path | string | The path of the folder to read. | |
| $filter | string | '.' | A filter for folder names. |
| $recurse | mixed | false | True to recursively search into sub-folders, or an integer to specify the maximum depth. |
| $full | boolean | false | True to return the full path to the folders. |
| $exclude | array | array('.svn', 'CVS','.DS_Store','__MACOSX') | Array with names of folders which should not be shown in the result. |
| $excludefilter | array | array('^\..*') | Array with regular expressions matching folders which should not be shown in the result. |
- Returns array Folders in the given folder.
- Defined on line 506 of libraries/joomla/filesystem/folder.php
- Since

- Referenced by
- JTableMenu::check
- JInstallerTemplate::discover
- JInstallerPlugin::discover
- JInstallerComponent::discover
- JInstallerModule::discover
- JInstallerLanguage::discover
- JCacheStorageCachelite::getAll
- JDatabase::getConnectors
- JFormFieldFolderList::getOptions
- JLanguage::parseLanguageFiles
- JInstallerHelper::unpack
See also
JFolder::folders source code on BitBucket
Class JFolder
Subpackage Filesystem- Other versions of JFolder::folders
User contributed notes
Code Examples