How To Delete All Files In A Directory
| From: | @ Nilaab | Date: | Wed, 13 Nov 2002 02:32:21 +0000 |
| Subject: | How To Delete All Files In A Directory | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-124135@lists.php.net to get a copy of this message | ||
Hello Everyone,
I have a directory that I want emptied everytime a script accesses a certain
function. I tried using rmdir() and then mkdir(), thinking that it will
delete the directory and the contents within it, and would create a brand
new directory for me to work with from scratch. Well, that didn't happen and
I read the PHP docs to see why.
I checked to see how else I can do this by reading about some other
filesystem functions, and now I'm more confused than ever. Which
combinations of functions would I need to empty a directory's entire
contents? I just need some direction on this. Thanks.
- Nilaab