note 76088 added to function.unlink
| From: | http://mediengestalter dot gleichjetzt dot de at osu1 dot php dot net | Date: | Fri, 29 Jun 2007 12:16:39 +0000 |
| Subject: | note 76088 added to function.unlink | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128085@lists.php.net to get a copy of this message | ||
I am using a recursive function to delete dir trees with files. Some of my files are quite big and
take a bit of time to delete. I have the problem now that php's unlink() does not wait for the
file to really be gone. So when after all the unlink()s I finally try to rmdir() then it can happen
that I get an error because the dir is not empty. I tried a sleep() after the unlink() and my
problems are gone. But I don't like this kind of sollution since it might break if the
environment changes. Is there a way to know when the file is gone?
----
Server IP: 217.160.72.57
Probable Submitter: 213.218.30.188
----
Manual Page -- http://www.php.net/manual/en/function.unlink.php
Edit -- https://master.php.net/note/edit/76088
Del: integrated -- https://master.php.net/note/delete/76088/integrated
Del: useless -- https://master.php.net/note/delete/76088/useless
Del: bad code -- https://master.php.net/note/delete/76088/bad+code
Del: spam -- https://master.php.net/note/delete/76088/spam
Del: non-english -- https://master.php.net/note/delete/76088/non-english
Del: in docs -- https://master.php.net/note/delete/76088/in+docs
Del: other reasons-- https://master.php.net/note/delete/76088
Reject -- https://master.php.net/note/reject/76088
Search -- https://master.php.net/manage/user-notes.php