diff options
| author | Marcus Boerger <helly@php.net> | 2006-01-06 19:58:10 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2006-01-06 19:58:10 +0000 |
| commit | 58349878fc650c0568c022529add5f58f77d10aa (patch) | |
| tree | 88d3d05028404606e02a6835ce5cdfbd74d44a34 /ext/spl/examples | |
| parent | 4d64a617c364612f8fbdd9ef73340a51f7416831 (diff) | |
| download | php-git-58349878fc650c0568c022529add5f58f77d10aa.tar.gz | |
- MFH Update
Diffstat (limited to 'ext/spl/examples')
| -rwxr-xr-x | ext/spl/examples/nocvsdir.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/spl/examples/nocvsdir.php b/ext/spl/examples/nocvsdir.php index a6b182f5f3..6993268945 100755 --- a/ext/spl/examples/nocvsdir.php +++ b/ext/spl/examples/nocvsdir.php @@ -4,7 +4,8 @@ * @brief Program Dir without CVS subdirs * @ingroup Examples * @author Marcus Boerger - * @date 2003 - 2005 + * @date 2003 - 2006 + * @version 1.1 * * Usage: php nocvsdir.php \<path\> * @@ -30,13 +31,18 @@ class NoCvsDirectory extends RecursiveFilterIterator { function __construct($path) { - parent::__construct(new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::CURRENT_AS_PATHNAME)); + parent::__construct(new RecursiveDirectoryIterator($path)); } function accept() { return $this->getInnerIterator()->getFilename() != 'CVS'; } + + function getChildren() + { + return new NoCvsDirectory($this->key()); + } } $it = new RecursiveIteratorIterator(new NoCvsDirectory($argv[1])); |
