Re: Recurs Directory Delete

From: Date: Fri, 14 Jul 2006 23:23:03 +0000
Subject: Re: Recurs Directory Delete
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-239494@lists.php.net to get a copy of this message
So? Windows has this thing called the "del" command that does the same thing as "rm". Regards, Adam. Mark Steudel wrote:
I wish, I'm on an IIS box. Mark -----Original Message----- From: Richard Lynch [mailto:ceo@l-i-e.com] Sent: Friday, July 14, 2006 2:09 PM To: tedd Cc: Mark Steudel; php-general@lists.php.net Subject: Re: [PHP] Recurs Directory Delete On Fri, July 14, 2006 2:07 pm, tedd wrote:
At 11:55 AM -0700 7/14/06, Mark Steudel wrote:
I was hoping someone could give me a hand, I'm trying to create a delete folders function that recursively deletes folders and files from a given directory.
If you want to delete EVERYTHING, an exec("rm -r $path") could potentially be much more efficient. You'd be trading the cost of opening up a mini-shell against PHP iteration, so it would depend on the number of directories, but if there are LOTS of files, the rm -r will probably win.


« previous php.general (#239494) next »