Class Gadget_Tree_FS

Description

Gadget_Tree_FS

File system tree

  • since: 1.0

Located in /Gadget/Tree/FS.php (line 39)

Gadget_Object
   |
   --Gadget_Tree
      |
      --Gadget_Tree_FS
Variable Summary
string $dirSep
bool $dotFiles
bool $onlyDirs
bool $onlyFiles
Method Summary
void buildTree (string $path, mixed $_level)
object &create (mixed $params, [string $class = __CLASS__])
mixed &fromDefault (mixed $from)
mixed fromPath (string $path)
Variables
string $dirSep = DIRECTORY_SEPARATOR (line 74)

Directory Separator

bool $dotFiles = true (line 49)

dotFiles

Whether to honor entries like ".", ".." and ".hidden_file".

  • access: public
bool $onlyDirs = false (line 67)

onlyDirs

Whether to just include directories.

bool $onlyFiles = false (line 58)

onlyFiles

Whether to just include files.

Inherited Variables

Inherited from Gadget_Tree

Gadget_Tree::$maxDepth
Gadget_Tree::$node
Gadget_Tree::$root
Methods
buildTree (line 142)

Builds the directory tree

  • access: protected
void buildTree (string $path, mixed $_level)
  • string $path
create (line 86)

Create

See Gadget_Tree::create().

  • access: public
object &create (mixed $params, [string $class = __CLASS__])
  • mixed $params
  • string $class

Redefinition of:
Gadget_Tree::create()
Create
fromDefault (line 98)

From Default

  • return: Returns the root node object on success or false.
  • access: public
mixed &fromDefault (mixed $from)
  • mixed $from: The source to set/build the tree from.
fromPath (line 119)

Build tree from path

Example:

  1. require_once 'Gadget_Tree.php';
  2. $tree = &Gadget_Tree::factory('FS');
  3. $tree->setOptions(array('dotFiles' => false, 'maxDepth' => 3));
  4. $tree->fromPath('.');
  5. $tree->dump();

  • access: public
mixed fromPath (string $path)
  • string $path

Inherited Methods

Inherited From Gadget_Tree

Gadget_Tree::create()
Gadget_Tree::dump()
Gadget_Tree::factory()
Gadget_Tree::fputs()
Gadget_Tree::from()
Gadget_Tree::fromNode()
Gadget_Tree::isError()
Gadget_Tree::raiseError()
Gadget_Tree::searchByPath()
Gadget_Tree::serialize()
Gadget_Tree::toArray()
Gadget_Tree::toFile()
Gadget_Tree::toString()
Gadget_Tree::unfold()
Gadget_Tree::unfoldTree()
Gadget_Tree::walkLink()

Inherited From Gadget_Object

Gadget_Object::Gadget_Object()
Gadget_Object::onAfterConstruct()
Gadget_Object::onBeforeConstruct()
Gadget_Object::setOptions()

Documentation generated on Sun, 03 Jul 2005 12:45:44 +0200 by phpDocumentor 1.3.0RC3