Class JFolder

Description

A Folder handling class

  • since: 1.1
  • static:

Located in /filesystem/folder.php (line 28)


	
			
Method Summary
 boolean create ([string $path = ''], [int $mode = 0755])
 boolean delete (string $path)
 boolean exists (string $path)
 array files (string $path, [string $filter = '.'], [boolean $recurse = false], [boolean $fullpath = false])
 array folders (string $path, [string $filter = '.'], [boolean $recurse = false], [boolean $fullpath = false])
 void listFolderTree (mixed $path, mixed $filter, [mixed $maxLevel = 3], mixed $level, mixed $parent)
 mixed move (string $src, string $dest, [string $path = ''])
Methods
create (line 38)

Create a folder -- and all necessary parent folders

  • return: True if successful
  • since: 1.1
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 158)

Delete a folder

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

Wrapper for the standard file_exists function

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

Utility function to read the files in a folder

  • return: Files in the given folder
  • since: 1.1
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 442)

Utility function to read the folders in a folder

  • return: Folders in the given folder
  • since: 1.1
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 550)

Lists folder in format suitable for tree display

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

Moves a folder

  • return: Error message on false or boolean True on success
  • since: 1.1
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 Sat, 4 Feb 2006 14:23:31 +0100 by phpDocumentor 1.3.0RC4