|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50932 RuntimeException: SplFileInfo::getType() [splfileinfo.gettype]: Lstat
Submitted: 2010-02-04 18:54 UTC Modified: 2010-02-04 23:12 UTC
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: draeli at draeli dot com Assigned:
Status: Open Package: SPL related
PHP Version: 5.3.1 OS: win32 only -Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: draeli at draeli dot com
New email:
PHP Version: OS:


 [2010-02-04 18:54 UTC] draeli at draeli dot com
Under Windows (XP Sp3), I have create a dir (with mkdir function) named 'Chouja Reideen - Love is..', when I read dir with SPL "RecursiveDirectoryIterator" and call method 'getType', I have this error message : "RuntimeException: SplFileInfo::getType() [splfileinfo.gettype]: Lstat".
Too, when I try to rename (with rename function), I have this error message "No such file or directory".
Dir really exist (with "getPathname" call method, name is correct) and I can't rename with system rename properties or MSDos rename function (and I have no solution to remove this dir ...).

Reproduce code:
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator('E:\directoryTest'), \RecursiveIteratorIterator::SELF_FIRST) as $objCur) {
	echo '<hr />';
	if ( preg_match('@^E:\\\directoryTest(.*)\.+$@U', $objCur->getPathname(), $out) ){
		rename($objCur->getPathname(), 'E:\directoryTest\\' . $out[1]);
	echo $objCur->getPathname() . '<br />';
	echo $objCur->getType() . '<br />';

Expected result:
List all file under a primary dir and rename file finish with one or more commat.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-04 23:12 UTC] draeli at draeli dot com
I realized that I had used the wrong word in 'Expected result' part.
Problem is with 'dot' and not 'commat'.
Sorry for this miss.
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Tue Jul 17 07:01:47 2018 UTC