Joomla CMS  3.8.5 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.8.5 et du framework Joomla Platform intégré
Référence de la classe JFolder

Fonctions membres publiques statiques

static copy ($src, $dest, $path='', $force=false, $use_streams=false)
 
static create ($path='', $mode=0755)
 
static delete ($path)
 
static move ($src, $dest, $path='', $use_streams=false)
 
static exists ($path)
 
static files ($path, $filter='.', $recurse=false, $full=false, $exclude=array('.svn', 'CVS', '.DS_Store', '__MACOSX'), $excludefilter=array('^\..*', '.*~'), $naturalSort=false)
 
static folders ($path, $filter='.', $recurse=false, $full=false, $exclude=array('.svn', 'CVS', '.DS_Store', '__MACOSX'), $excludefilter=array('^\..*'))
 
static listFolderTree ($path, $filter, $maxLevel=3, $level=0, $parent=0)
 
static makeSafe ($path)
 

Fonctions membres protégées statiques

static _items ($path, $filter, $recurse, $full, $exclude, $excludefilter_string, $findfiles)
 

Description détaillée

A Folder handling class

Depuis
11.1

Documentation des fonctions membres

◆ _items()

static _items (   $path,
  $filter,
  $recurse,
  $full,
  $exclude,
  $excludefilter_string,
  $findfiles 
)
staticprotected

Function to read the files/folders in a folder.

Paramètres
string$pathThe path of the folder to read.
string$filterA filter for file names.
mixed$recurseTrue to recursively search into sub-folders, or an integer to specify the maximum depth.
boolean$fullTrue to return the full path to the file.
array$excludeArray with names of files which should not be shown in the result.
string$excludefilter_stringRegexp of files to exclude
boolean$findfilesTrue to read the files, false to read the folders
Renvoie
array Files.
Depuis
11.1

Références $file, $filter, et $path.

◆ copy()

static copy (   $src,
  $dest,
  $path = '',
  $force = false,
  $use_streams = false 
)
static

Copy a folder.

Paramètres
string$srcThe path to the source folder.
string$destThe path to the destination folder.
string$pathAn optional base path to prefix to the file names.
boolean$forceForce copy.
boolean$use_streamsOptionally force folder/file overwrites.
Renvoie
boolean True on success.
Depuis
11.1
Exceptions
RuntimeException

Références $file, $path, JFilesystemWrapperPath\clean(), DIRECTORY_SEPARATOR, JPATH_ROOT, et null.

Référencé par JFilesystemWrapperFolder\copy(), TemplatesModelTemplate\copy(), et Installer\copyFiles().

◆ create()

◆ delete()

◆ exists()

◆ files()

static files (   $path,
  $filter = '.',
  $recurse = false,
  $full = false,
  $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'),
  $excludefilter = array('^\..*', '.*~'),
  $naturalSort = false 
)
static

Utility function to read the files in a folder.

Paramètres
string$pathThe path of the folder to read.
string$filterA filter for file names.
mixed$recurseTrue to recursively search into sub-folders, or an integer to specify the maximum depth.
boolean$fullTrue to return the full path to the file.
array$excludeArray with names of files which should not be shown in the result.
array$excludefilterArray of filter to exclude
boolean$naturalSortFalse for asort, true for natsort
Renvoie
array Files in the given folder.
Depuis
11.1

Références $filter, et $path.

Référencé par InstallationModelDatabase\createTables(), TemplatesModelTemplate\createTemplateOverride(), MediaControllerFolder\delete(), MediaControllerFile\delete(), InstallerHelper\detectType(), LibraryAdapter\discover(), PluginAdapter\discover(), JFilesystemWrapperFolder\files(), Installer\findManifest(), TemplatesModelTemplate\fixTemplateName(), FOFIntegrationJoomlaFilesystem\folderFiles(), BannersModelTracks\getContent(), JFormFieldModulelayout\getInput(), JFormFieldComponentlayout\getInput(), MediaModelList\getList(), InstallationFormFieldSample\getOptions(), JFormFieldFileList\getOptions(), MenuHelper\getPresets(), AdminModelHelp\getToc(), MenusModelMenutypes\getTypeOptionsFromLayouts(), FieldsPlugin\onCustomFieldsGetTypes(), Installer\parseSchemaUpdates(), FileAdapter\populateFilesAndFolderList(), InstallerModelUpdatesites\rebuild(), LanguagesModelStrings\refresh(), Installer\setSchemaVersion(), FileAdapter\uninstall(), LibraryAdapter\uninstall(), et InstallerHelper\unpack().

◆ folders()

static folders (   $path,
  $filter = '.',
  $recurse = false,
  $full = false,
  $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'),
  $excludefilter = array('^\..*') 
)
static

Utility function to read the folders in a folder.

Paramètres
string$pathThe path of the folder to read.
string$filterA filter for folder names.
mixed$recurseTrue to recursively search into sub-folders, or an integer to specify the maximum depth.
boolean$fullTrue to return the full path to the folders.
array$excludeArray with names of folders which should not be shown in the result.
array$excludefilterArray with regular expressions matching folders which should not be shown in the result.
Renvoie
array Folders in the given folder.
Depuis
11.1

Références $filter, et $path.

Référencé par CacheliteStorage\clean(), TemplatesModelTemplate\createTemplateOverride(), ModuleAdapter\discover(), TemplateAdapter\discover(), PluginAdapter\discover(), LanguageAdapter\discover(), ComponentAdapter\discover(), FOFIntegrationJoomlaFilesystem\folderFolders(), JFilesystemWrapperFolder\folders(), MediaModelManager\getFolderList(), LanguagesModelInstalled\getFolders(), MediaModelManager\getFolderTree(), MediaModelList\getList(), InstallationApplicationWeb\getLocaliseAdmin(), JFormFieldDirectories\getOptions(), JFormFieldFolderList\getOptions(), TemplatesModelTemplate\getOverridesList(), MenusModelMenutypes\getTypeOptionsFromLayouts(), MenusModelMenutypes\getTypeOptionsFromMvc(), Menu\store(), et InstallerHelper\unpack().

◆ listFolderTree()

static listFolderTree (   $path,
  $filter,
  $maxLevel = 3,
  $level = 0,
  $parent = 0 
)
static

Lists folder in format suitable for tree display.

Paramètres
string$pathThe path of the folder to read.
string$filterA filter for folder names.
integer$maxLevelThe maximum number of levels to recursively read, defaults to three.
integer$levelThe current level, optional.
integer$parentUnique identifier of the parent folder, if any.
Renvoie
array Folders in the given folder.
Depuis
11.1

Références $filter, $GLOBALS, $id, $name, $path, et JPATH_ROOT.

Référencé par JFilesystemWrapperFolder\listFolderTree().

◆ makeSafe()

static makeSafe (   $path)
static

Makes path name safe to use.

Paramètres
string$pathThe full path to sanitise.
Renvoie
string The sanitised string.
Depuis
11.1

Références $path.

Référencé par ContenthistoryHelper\getFormFile(), et JFilesystemWrapperFolder\makeSafe().

◆ move()

static move (   $src,
  $dest,
  $path = '',
  $use_streams = false 
)
static

Moves a folder.

Paramètres
string$srcThe path to the source folder.
string$destThe path to the destination folder.
string$pathAn optional base path to prefix to the file names.
boolean$use_streamsOptionally use streams.
Renvoie
mixed Error message on false or boolean true on success.
Depuis
11.1

Références $path, JFilesystemWrapperPath\clean(), et JPATH_ROOT.

Référencé par JFilesystemWrapperFolder\move().


La documentation de cette classe a été générée à partir du fichier suivant :