summaryrefslogtreecommitdiff
path: root/ext/spl/examples/directorytreeiterator.inc
diff options
context:
space:
mode:
authorSVN Migration <svn@php.net>2003-12-21 18:30:32 +0000
committerSVN Migration <svn@php.net>2003-12-21 18:30:32 +0000
commite3259a13021986d5b0c1182aeef12dd6731f75a1 (patch)
tree62d0027eae699f503d591dbfd33689ce57573ef3 /ext/spl/examples/directorytreeiterator.inc
parent86e776470c56a462fff9ec01d0e1a715accadc6c (diff)
downloadphp-git-php-5.0.0b3.tar.gz
This commit was manufactured by cvs2svn to create tag 'php_5_0_0b3'.php-5.0.0b3
Diffstat (limited to 'ext/spl/examples/directorytreeiterator.inc')
-rw-r--r--ext/spl/examples/directorytreeiterator.inc26
1 files changed, 0 insertions, 26 deletions
diff --git a/ext/spl/examples/directorytreeiterator.inc b/ext/spl/examples/directorytreeiterator.inc
deleted file mode 100644
index 13253d9a52..0000000000
--- a/ext/spl/examples/directorytreeiterator.inc
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-
-class DirectoryTreeIterator extends RecursiveIteratorIterator
-{
- function __construct($path)
- {
- parent::__construct(new CachingRecursiveIterator(new RecursiveDirectoryIterator($path), CIT_CALL_TOSTRING|CIT_CATCH_GET_CHILD), 1);
- }
-
- function current()
- {
- $tree = '';
- for ($l=0; $l < $this->getDepth(); $l++) {
- $tree .= $this->getSubIterator($l)->hasNext() ? '| ' : ' ';
- }
- return $tree . ($this->getSubIterator($l)->hasNext() ? '|-' : '\-')
- . $this->getSubIterator($l)->__toString();
- }
-
- function __call($func, $params)
- {
- return call_user_func_array(array($this->getSubIterator(), $func), $params);
- }
-}
-
-?> \ No newline at end of file