Re: Recurs Directory Delete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux