Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe Folder

Fonctions membres publiques statiques

static copy ($src, $dest, $path='', $force=false, $useStreams=false)
 
static create ($path='', $mode=0755)
 
static delete ($path)
 
static move ($src, $dest, $path='', $useStreams=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, $excludeFilterString, $findFiles)
 

Description détaillée

A Folder handling class

Depuis
1.7.0

Documentation des fonctions membres

◆ _items()

static _items (   $path,
  $filter,
  $recurse,
  $full,
  $exclude,
  $excludeFilterString,
  $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$excludeFilterStringRegexp of files to exclude
boolean$findFilesTrue to read the files, false to read the folders
Renvoie
array Files.
Depuis
1.7.0

Références $path.

◆ copy()

static copy (   $src,
  $dest,
  $path = '',
  $force = false,
  $useStreams = 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$useStreamsOptionally force folder/file overwrites.
Renvoie
boolean True on success.
Depuis
1.7.0
Exceptions

Références $path, Laminas\Diactoros\$stream, Path\clean(), ClientHelper\getCredentials(), FtpClient\getInstance(), Factory\getStream(), JPATH_ROOT, null, et Path\removeRoot().

Référencé par TemplateModel\copy(), Installer\copyFiles(), UpdateCoreCommand\copyFileTo(), LocalAdapter\copyFolder(), et LocalAdapter\moveFolder().

◆ 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|boolean Files in the given folder.
Depuis
1.7.0

Références $path, Log\add(), Path\clean(), Text\sprintf(), et Log\WARNING.

Référencé par TemplateModel\createTemplateOverride(), InstallerHelper\detectType(), PluginAdapter\discover(), Installer\findManifest(), TemplateModel\fixTemplateName(), TracksModel\getContent(), LocalAdapter\getFiles(), FieldLayoutField\getInput(), ModulelayoutField\getInput(), ComponentlayoutField\getInput(), FilelistField\getOptions(), MenusHelper\getPresets(), ChromestyleField\getTemplateModuleStyles(), HelpModel\getToc(), MenutypesModel\getTypeOptionsFromLayouts(), ChangeSet\getUpdateFiles(), FieldsPlugin\onCustomFieldsGetTypes(), Joomla\Plugin\Editors\TinyMCE\PluginTraits\onDisplay(), Installer\parseSchemaUpdates(), FileAdapter\populateFilesAndFolderList(), ModuleModel\preprocessForm(), UpdatesitesModel\rebuild(), StringsModel\refresh(), FileAdapter\removeExtensionFiles(), LibraryAdapter\removeExtensionFiles(), Installer\setSchemaVersion(), ConfigurationModel\setup(), 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
1.7.0

Références $path, Log\add(), Path\clean(), Text\sprintf(), et Log\WARNING.

Référencé par TemplateModel\createTemplateOverride(), ModuleAdapter\discover(), PluginAdapter\discover(), TemplateAdapter\discover(), LanguageAdapter\discover(), ComponentAdapter\discover(), LocalAdapter\getFiles(), InstalledModel\getFolders(), MenutypesModel\getFolders(), InstallationApplication\getLocaliseAdmin(), FolderlistField\getOptions(), TemplateModel\getOverridesList(), MenutypesModel\getTypeOptionsFromLayouts(), MenutypesModel\getTypeOptionsFromMvc(), LibraryAdapter\removeExtensionFiles(), 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
1.7.0

Références $id, $name, $path, Path\clean(), et JPATH_ROOT.

◆ 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
1.7.0

Références $path.

Référencé par ContenthistoryHelper\getFormFile().

◆ move()

static move (   $src,
  $dest,
  $path = '',
  $useStreams = 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$useStreamsOptionally use streams.
Renvoie
mixed Error message on false or boolean true on success.
Depuis
1.7.0

Références $path, Laminas\Diactoros\$stream, Text\_(), Path\clean(), ClientHelper\getCredentials(), FtpClient\getInstance(), Factory\getStream(), JPATH_ROOT, et Text\sprintf().

Référencé par LocalAdapter\moveFolder().


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