Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
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 files ($path, $filter='.', $recurse=false, $full=false, $exclude=array('.svn', 'CVS', '.DS_Store', '__MACOSX'), $excludeFilter=array('^\..*', '.*~'))
 
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.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.0

Références $file, $filter, $path, et Path\clean().

◆ 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.0
Exceptions
FilesystemException

Références $file, $path, Path\clean(), DIRECTORY_SEPARATOR, Stream\getStream(), et null.

◆ create()

static create (   $path = '',
  $mode = 0755 
)
static

Create a folder – and all necessary parent folders.

Paramètres
string$pathA path to create from the base path.
integer$modeDirectory permissions to set for folders created. 0755 by default.
Renvoie
boolean True if successful.
Depuis
1.0
Exceptions
FilesystemException

Références $mode, $path, Path\clean(), et null.

Référencé par Archive\extract(), Tar\extract(), Zip\extractCustom(), Zip\extractNative(), File\upload(), et File\write().

◆ delete()

static delete (   $path)
static

Delete a folder.

Paramètres
string$pathThe path to the folder to delete.
Renvoie
boolean True on success.
Depuis
1.0
Exceptions
FilesystemException

Références $files, $folder, $path, Path\clean(), File\delete(), elseif, et Path\removeRoot().

◆ files()

static files (   $path,
  $filter = '.',
  $recurse = false,
  $full = false,
  $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'),
  $excludeFilter = array('^\..*', '.*~') 
)
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
Renvoie
array Files in the given folder.
Depuis
1.0
Exceptions

Références $filter, $path, Path\clean(), et Path\removeRoot().

◆ 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.0
Exceptions

Références $filter, $path, Path\clean(), et Path\removeRoot().

◆ 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.0

Références $filter, $GLOBALS, $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.0

Références $path.

◆ 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
string|boolean Error message on false or boolean true on success.
Depuis
1.0

Références $path, Path\clean(), et Stream\getStream().


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