JFolder
Description
A Folder handling class
Located in /joomla/filesystem/folder.php (line 29)
JFolder (Subpackage FileSystem)
Method Summary
array
files
(string $path, [string $filter = '.'], [mixed $recurse = false], [boolean $fullpath = false], [array $exclude = array('.svn', 'CVS')])
array
folders
(string $path, [string $filter = '.'], [mixed $recurse = false], [boolean $fullpath = false], [array $exclude = array('.svn', 'CVS')])
array
listFolderTree
(string $path, string $filter, [integer $maxLevel = 3], [integer $level = 0], [integer $parent = 0])
Methods
Copies a folder
mixed
copy
(string $src, string $dest, [string $path = ''], [boolean $force = false])
- 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: Optionally force folder/file overwrites
Create a folder -- and all necessary parent folders
boolean
create
([string $path = ''], [int $mode = 0755])
- string $path: A path to create from the base path
- int $mode: Directory permissions to set for folders created
Delete a folder
boolean
delete
(string $path)
- string $path: The path to the folder to delete
Wrapper for the standard file_exists function
boolean
exists
(string $path)
- string $path: Folder name relative to installation dir
Utility function to read the files in a folder
array
files
(string $path, [string $filter = '.'], [mixed $recurse = false], [boolean $fullpath = false], [array $exclude = array('.svn', 'CVS')])
- 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 $fullpath: True to return the full path to the file
- array $exclude: Array with names of files which should not be shown in the result
Utility function to read the folders in a folder
array
folders
(string $path, [string $filter = '.'], [mixed $recurse = false], [boolean $fullpath = false], [array $exclude = array('.svn', 'CVS')])
- 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 $fullpath: True to return the full path to the folders
- array $exclude: Array with names of folders which should not be shown in the result
Lists folder in format suitable for tree display
array
listFolderTree
(string $path, string $filter, [integer $maxLevel = 3], integer $level, integer $parent)
- 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, default 3
- integer $level: The current level, optional
- integer $parent
Makes path name safe to use
string
makeSafe
(string $path)
- string $path: The full path to sanitise
Moves a folder
mixed
move
(string $src, string $dest, [string $path = ''])
- 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
Documentation generated on Tue, 29 Jan 2008 18:46:02 +0000 by phpDocumentor 1.3.1



JFolder (Subpackage FileSystem)