ID:               29960
 Updated by:       [EMAIL PROTECTED]
 Reported By:      asgarbutt at ucdavis dot edu
-Status:           Assigned
+Status:           Closed
 Bug Type:         Documentation problem
 Operating System: *
 PHP Version:      5.0.1
 Assigned To:      nlopess
 New Comment:

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.




Previous Comments:
------------------------------------------------------------------------

[2004-09-03 08:27:14] [EMAIL PROTECTED]

DirectoryIterator has no file*() functions

------------------------------------------------------------------------

[2004-09-03 00:37:46] asgarbutt at ucdavis dot edu

Found a better link to the SPL.  It is still not complete, but it is
much more thorough that the documentation provided on
http://www.php.net/manual/en/function.directoryiterator-filetype.php

It can be found here at : 
http://www.php.net/~helly/php/ext/spl/index.html

Sorry about the bug post.

------------------------------------------------------------------------

[2004-09-03 00:27:08] asgarbutt at ucdavis dot edu

In my description, i wrote the wrong quote.  It should be ...
Fatal error: Call to undefined method DirectoryIterator::fileType() in
C:\Apache2\htdocs\imagearchive\test.php on line 40

as stated in the Actual result section.

------------------------------------------------------------------------

[2004-09-03 00:15:34] asgarbutt at ucdavis dot edu

Description:
------------
When utilizing the new DirectoryIterator of PHP5 (5.0.1) I get the
following message.

Fatal error: Call to undefined method DirectoryIterator::fileExt() in
C:\Apache2\htdocs\imagearchive\test.php on line 40

The function is listed in the documentation but only minimumly.

Reproduce code:
---------------
$sPath = 'C:\Apache2\htdocs'

foreach (new DirectoryIterator($sPath) as $oFile) {
  if ($oFile->isFile()) {
    echo 'isFile => '.$oFile->isFile().'<br />';
    echo 'getFilename => '.$oFile->getFilename().'<br />';
    echo 'fileType => '.$oFile->fileType().'<br />';
  }
}


Expected result:
----------------
isFile => 1
getFilename => apache_pb.gif
fileType => .gif (or something similar)

Actual result:
--------------
isFile => 1
getFilename => apache_pb.gif

Fatal error: Call to undefined method DirectoryIterator::fileType() in
C:\Apache2\htdocs\imagearchive\test.php on line 40


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29960&edit=1

Reply via email to