summaryrefslogtreecommitdiff
path: root/ext/spl/examples/directorytreeiterator.inc
diff options
context:
space:
mode:
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