Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

License

Content on this site is copyright © 2005 - 2008 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5. Some parts of this website may be subject to other licenses.

 Class JFolder

Description

A Folder handling class

Located in /joomla/filesystem/folder.php (line 29)

Class JFolder   (Subpackage FileSystem)
Method Summary
Method mixed copy (string $src, string $dest, [string $path = ''], [boolean $force = false])
Method boolean create ([string $path = ''], [int $mode = 0755])
Method boolean delete (string $path)
Method boolean exists (string $path)
Method array files (string $path, [string $filter = '.'], [mixed $recurse = false], [boolean $fullpath = false], [array $exclude = array('.svn', 'CVS')])
Method array folders (string $path, [string $filter = '.'], [mixed $recurse = false], [boolean $fullpath = false], [array $exclude = array('.svn', 'CVS')])
Method array listFolderTree (string $path, string $filter, [integer $maxLevel = 3], [integer $level = 0], [integer $parent = 0])
Method string makeSafe (string $path)
Method mixed move (string $src, string $dest, [string $path = ''])
Methods
copy (line 41)

Copies a folder

  • return: JError object on failure or boolean True on success
  • since: 1.5
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 (line 137)

Create a folder -- and all necessary parent folders

  • return: True if successful
  • since: 1.5
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 (line 240)

Delete a folder

  • return: True on success
  • since: 1.5
boolean delete (string $path)
  • string $path: The path to the folder to delete
exists (line 361)

Wrapper for the standard file_exists function

  • return: True if path is a folder
  • since: 1.5
boolean exists (string $path)
  • string $path: Folder name relative to installation dir
files (line 377)

Utility function to read the files in a folder

  • return: Files in the given folder
  • since: 1.5
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
folders (line 434)

Utility function to read the folders in a folder

  • return: Folders in the given folder
  • since: 1.5
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
listFolderTree (line 490)

Lists folder in format suitable for tree display

  • return: Folders in the given folder
  • since: 1.5
  • access: public
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
makeSafe (line 519)

Makes path name safe to use

  • return: The sanitised string
  • since: 1.5
  • access: public
string makeSafe (string $path)
  • string $path: The full path to sanitise
move (line 313)

Moves a folder

  • return: Error message on false or boolean True on success
  • since: 1.5
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