note 76088 deleted from function.unlink by nlopess

From: Date: Fri, 29 Jun 2007 14:08:54 +0000
Subject: note 76088 deleted from function.unlink by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-128088@lists.php.net to get a copy of this message
Note Submitter: http://mediengestalter.gleichjetzt.de ---- 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?

« previous php.notes (#128088) next »