|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-02-04 20:37 UTC] jani@php.net
[2010-02-04 21:52 UTC] draeli at draeli dot com
[2010-02-26 00:19 UTC] kalle@php.net
[2010-03-05 06:01 UTC] php-bugs at lists dot php dot net
[2010-04-25 20:18 UTC] felipe@php.net
-Status: No Feedback
+Status: Feedback
[2010-04-25 20:18 UTC] felipe@php.net
[2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 06:00:02 2025 UTC |
Description: ------------ Under Windows (XP Sp3) I want to remove files and dir recursively. When dir contain '-' (dash symbol), error message "UnexpectedValueException: RecursiveDirectoryIterator::__construct(E:\directoryTest\name - file) [recursivedirectoryiterator.--construct]: failed to open dir: No such file or directory in" is call and script is stop after loop (consequently dir is really remove) Reproduce code: --------------- foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator('E:\directoryTest'), \RecursiveIteratorIterator::SELF_FIRST) as $objCur) { if ( $objCur->isDir() ){ rmdir($objCur->getPathname()); }else{ unlink($objCur->getPathname()); } } Expected result: ---------------- I try to remove file and dir recurvely since one dir. Actual result: -------------- Actual result is file are delete, dir too but script stop after loop if current read dir contain dash symbol.