Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 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 = '.'], [boolean $recurse = false], [boolean $fullpath = false])
Method array folders (string $path, [string $filter = '.'], [boolean $recurse = false], [boolean $fullpath = false])
Method void listFolderTree ( $path,  $filter, [ $maxLevel = 3], [ $level = 0], [ $parent = 0])
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 136)

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 239)

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 353)

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 368)

Utility function to read the files in a folder

  • return: Files in the given folder
  • since: 1.5
array files (string $path, [string $filter = '.'], [boolean $recurse = false], [boolean $fullpath = false])
  • string $path: The path of the folder to read
  • string $filter: A filter for file names
  • boolean $recurse: True to recursively search into sub-folders
  • boolean $fullpath: True to return the full path to the file
folders (line 420)

Utility function to read the folders in a folder

  • return: Folders in the given folder
  • since: 1.5
array folders (string $path, [string $filter = '.'], [boolean $recurse = false], [boolean $fullpath = false])
  • string $path: The path of the folder to read
  • string $filter: A filter for folder names
  • boolean $recurse: True to recursively search into sub-folders
  • boolean $fullpath: True to return the full path to the folders
listFolderTree (line 463)

Lists folder in format suitable for tree display

void listFolderTree ( $path,  $filter, [ $maxLevel = 3],  $level,  $parent)
  • $path
  • $filter
  • $maxLevel
  • $level
  • $parent
move (line 305)

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 Mon, 05 Mar 2007 20:59:32 +0000 by phpDocumentor 1.3.1