Difference between revisions of "JFolder::files"
From Joomla! Documentation
(Layout updates) |
m (preparing for archive only) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
Utility function to read the files in a folder. | Utility function to read the files in a folder. | ||
− | + | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
<source lang="php"> | <source lang="php"> | ||
− | public static | + | public static function files ( |
+ | $path | ||
+ | $filter= '.' | ||
+ | $recurse=false | ||
+ | $full=false | ||
+ | $exclude=array('.svn' | ||
+ | 'CVS' | ||
+ | '.DS_Store' | ||
+ | '__MACOSX' | ||
+ | $excludefilter=array('^\..*' | ||
+ | '.*~' | ||
+ | ) | ||
</source> | </source> | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 49: | Line 55: | ||
|array | |array | ||
|array('^\..*','.*~') | |array('^\..*','.*~') | ||
− | |Array of filter to exclude | + | |Array of filter to exclude |
|- | |- | ||
|} | |} | ||
− | + | * '''Returns''' array Files in the given folder. | |
− | array Files in the given folder. | + | * '''Defined''' on line 462 of libraries/joomla/filesystem/folder.php |
− | + | * '''Since''' {{JVer|11.1 }} | |
− | libraries/joomla/filesystem/folder.php | + | * '''Referenced by''' |
− | * | + | ** [[API17:JElementModuleLayouts::_getOptions|JElementModuleLayouts::_getOptions]] |
− | + | ** [[API17:JElementComponentLayouts::_getOptions|JElementComponentLayouts::_getOptions]] | |
− | * [[JElementModuleLayouts::_getOptions | + | ** [[API17:JInstallerHelper::detectType|JInstallerHelper::detectType]] |
− | * [[JElementComponentLayouts::_getOptions | + | ** [[API17:JInstallerPlugin::discover|JInstallerPlugin::discover]] |
− | * [[JInstallerHelper::detectType | + | ** [[API17:JInstallerLibrary::discover|JInstallerLibrary::discover]] |
− | * [[JInstallerPlugin::discover | + | ** [[API17:JInstaller::findManifest|JInstaller::findManifest]] |
− | * [[JInstallerLibrary::discover | + | ** [[API17:JCacheStorageCachelite::getAll|JCacheStorageCachelite::getAll]] |
− | * [[JInstaller::findManifest | + | ** [[API17:JFormFieldModuleLayout::getInput|JFormFieldModuleLayout::getInput]] |
− | * [[JCacheStorageCachelite::getAll | + | ** [[API17:JFormFieldComponentLayout::getInput|JFormFieldComponentLayout::getInput]] |
− | * [[ | + | ** [[API17:JFilesystemHelper::getJStreams|JFilesystemHelper::getJStreams]] |
− | + | ** [[API17:JFormFieldFileList::getOptions|JFormFieldFileList::getOptions]] | |
− | * [[JFormFieldComponentLayout::getInput | + | ** [[API17:JSession::getStores|JSession::getStores]] |
− | * [[JFilesystemHelper::getJStreams | + | ** [[API17:JCache::getStores|JCache::getStores]] |
− | * [[JFormFieldFileList::getOptions | + | ** [[API17:JHtmlList::images|JHtmlList::images]] |
− | * [[JSession::getStores | + | ** [[API17:JAdapter::loadAllAdapters|JAdapter::loadAllAdapters]] |
− | * [[JCache::getStores | + | ** [[API17:JInstaller::parseSchemaUpdates|JInstaller::parseSchemaUpdates]] |
− | * [[JHtmlList::images | + | ** [[API17:JLanguage::parseXMLLanguageFiles|JLanguage::parseXMLLanguageFiles]] |
− | * [[JAdapter::loadAllAdapters | + | ** [[API17:JInstaller::setSchemaVersion|JInstaller::setSchemaVersion]] |
− | * [[JInstaller::parseSchemaUpdates | + | ** [[API17:JInstallerPlugin::uninstall|JInstallerPlugin::uninstall]] |
− | * [[JLanguage::parseXMLLanguageFiles | + | ** [[API17:JInstallerLibrary::uninstall|JInstallerLibrary::uninstall]] |
− | * [[JInstaller::setSchemaVersion | + | ** [[API17:JInstallerFile::uninstall|JInstallerFile::uninstall]] |
− | * [[JInstallerPlugin::uninstall | + | ** [[API17:JInstallerHelper::unpack|JInstallerHelper::unpack]] |
− | * [[JInstallerLibrary::uninstall | ||
− | * [[JInstallerFile::uninstall | ||
− | * [[JInstallerHelper::unpack | ||
===See also=== | ===See also=== | ||
− | + | * {{JVer|11.1}} '''JFolder::files source code''' on [[jplatform:filesystem/folder.php#cl-454|BitBucket]] | |
− | + | * {{JVer|11.1}} Class [[API17:JFolder|JFolder]] | |
− | + | * {{JVer|11.1}} Subpackage [[API17:Subpackage_Filesystem|Filesystem]] | |
− | * | + | * [[API17:JFolder::files|Other versions of JFolder::files]] |
− | * [[JFolder::files|Other versions of | + | |
− | + | ||
− | ===Examples=== | + | ===User contributed notes=== |
− | + | === Code Examples === | |
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JFolder::files | category=JFolder::files | ||
− | + | namespace=CodeExample | |
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
+ | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
− | <noinclude>[[Category: | + | <noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude> |
Latest revision as of 22:03, 24 March 2017
The "API17" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
JFolder::files[edit]
Description[edit]
Utility function to read the files in a folder.
public static function files (
$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 file 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 file. |
$exclude | array | array('.svn', 'CVS','.DS_Store','__MACOSX') | Array with names of files which should not be shown in the result. |
$excludefilter | array | array('^\..*','.*~') | Array of filter to exclude |
- Returns array Files in the given folder.
- Defined on line 462 of libraries/joomla/filesystem/folder.php
- Since
- Referenced by
- JElementModuleLayouts::_getOptions
- JElementComponentLayouts::_getOptions
- JInstallerHelper::detectType
- JInstallerPlugin::discover
- JInstallerLibrary::discover
- JInstaller::findManifest
- JCacheStorageCachelite::getAll
- JFormFieldModuleLayout::getInput
- JFormFieldComponentLayout::getInput
- JFilesystemHelper::getJStreams
- JFormFieldFileList::getOptions
- JSession::getStores
- JCache::getStores
- JHtmlList::images
- JAdapter::loadAllAdapters
- JInstaller::parseSchemaUpdates
- JLanguage::parseXMLLanguageFiles
- JInstaller::setSchemaVersion
- JInstallerPlugin::uninstall
- JInstallerLibrary::uninstall
- JInstallerFile::uninstall
- JInstallerHelper::unpack
See also[edit]
- JFolder::files source code on BitBucket
- Class JFolder
- Subpackage Filesystem
- Other versions of JFolder::files
User contributed notes[edit]
Code Examples[edit]