cvs: php4 /pear/File Find.php

From: Date: Sun, 23 Jul 2000 17:00:45 +0000
Subject: cvs: php4 /pear/File Find.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-873@lists.php.net to get a copy of this message
sterling Sun Jul 23 10:00:45 2000 EDT Modified files: /php4/pear/File Find.php Log: Fixes. Index: php4/pear/File/Find.php diff -u php4/pear/File/Find.php:1.5 php4/pear/File/Find.php:1.6 --- php4/pear/File/Find.php:1.5 Fri Jul 21 11:34:38 2000 +++ php4/pear/File/Find.php Sun Jul 23 10:00:45 2000 @@ -16,11 +16,11 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Find.php,v 1.5 2000/07/21 18:34:38 sterling Exp $ +// $Id: Find.php,v 1.6 2000/07/23 17:00:45 sterling Exp $ // // Commonly needed functions searching directory trees // -include_once 'PEAR_ERROR.php'; +include_once 'PEAR_Error.php'; class File_Find @@ -38,10 +38,10 @@ */ function &glob ($pattern, $dirpath, $pattern_type='php') { - $dh = @opendir ($dirpath) + $dh = @opendir ($dirpath); if (!$dh) { - $pe = new ExceptionFileFind ("Cannot open directory"); + $pe = new FileFindException ("Cannot open directory"); return ($pe); } @@ -131,7 +131,7 @@ $dh = @opendir ($directory); if (!$dh) { - $pe = new ExceptionFileFind ("Cannot open directory"); + $pe = new FileFindException ("Cannot open directory"); return ($pe); } @@ -139,10 +139,10 @@ { if ($entry != '.' && $entry != '..') { - $entry = $directory . $entry; + $entry = "$directory/$entry"; if (is_dir ($entry)) - array_push ($this->_dirs, "${entry}/"); + array_push ($this->_dirs, $entry); else array_push ($this->files, $entry); } @@ -173,12 +173,12 @@ class FileFindException extends PEAR_Error { - var $CLASSNAME = 'ExceptionFileFind'; - var $ERROR_MESSAGE_PREPEND = 'Error in ExceptionFileFind'; + var $classname = 'ExceptionFileFind'; + var $error_message_prepend = 'Error in ExceptionFileFind'; - function ExceptionFileFind ($message, $file = __FILE__, $line = __LINE__) + function FileFindException ($message, $file = __FILE__, $line = __LINE__) { - parent::PEAR_Error ($message, $file, $line); + PEAR_Error::PEAR_Error ($message, $file, $line); } }

« previous php.cvs (#873) next »