|
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) |
|
|
static | _items ($path, $filter, $recurse, $full, $exclude, $excludeFilterString, $findfiles) |
|
A Folder handling class
- Depuis
- 1.0
◆ _items()
static _items |
( |
|
$path, |
|
|
|
$filter, |
|
|
|
$recurse, |
|
|
|
$full, |
|
|
|
$exclude, |
|
|
|
$excludeFilterString, |
|
|
|
$findfiles |
|
) |
| |
|
staticprotected |
Function to read the files/folders in a folder.
- Paramètres
-
string | $path | The path of the folder to read. |
string | $filter | A filter for file names. |
mixed | $recurse | True to recursively search into sub-folders, or an integer to specify the maximum depth. |
boolean | $full | True to return the full path to the file. |
array | $exclude | Array with names of files which should not be shown in the result. |
string | $excludeFilterString | Regexp of files to exclude |
boolean | $findfiles | True 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 | $src | The path to the source folder. |
string | $dest | The path to the destination folder. |
string | $path | An optional base path to prefix to the file names. |
boolean | $force | Force copy. |
boolean | $useStreams | Optionally force folder/file overwrites. |
- Renvoie
- boolean True on success.
- Depuis
- 1.0
- Exceptions
-
Références $file, $path, Path\clean(), DIRECTORY_SEPARATOR, Stream\getStream(), et null.
◆ create()
static create |
( |
|
$path = '' , |
|
|
|
$mode = 0755 |
|
) |
| |
|
static |
◆ delete()
◆ 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 | $path | The path of the folder to read. |
string | $filter | A filter for file names. |
mixed | $recurse | True to recursively search into sub-folders, or an integer to specify the maximum depth. |
boolean | $full | True to return the full path to the file. |
array | $exclude | Array with names of files which should not be shown in the result. |
array | $excludeFilter | Array 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 | $path | The path of the folder to read. |
string | $filter | A filter for folder names. |
mixed | $recurse | True to recursively search into sub-folders, or an integer to specify the maximum depth. |
boolean | $full | True to return the full path to the folders. |
array | $exclude | Array with names of folders which should not be shown in the result. |
array | $excludeFilter | Array 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 | $path | The path of the folder to read. |
string | $filter | A filter for folder names. |
integer | $maxLevel | The maximum number of levels to recursively read, defaults to three. |
integer | $level | The current level, optional. |
integer | $parent | Unique 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()
Makes path name safe to use.
- Paramètres
-
string | $path | The 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 | $src | The path to the source folder. |
string | $dest | The path to the destination folder. |
string | $path | An optional base path to prefix to the file names. |
boolean | $useStreams | Optionally 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 :