PHP recursive directory remove function
<?phpfunction RemoveDir($sDir) {if (is_dir($sDir)) {$sDir = rtrim($sDir, '/');$oDir = dir($sDir);while (($sFile = $oDir->read()) !== false) {if ($sFile != '.' && $sFile != '..') {(!is_link("$sDir/$sFile") && is_dir("$sDir/$sFile")) ? RemoveDir("$sDir/$sFile") : unlink("$sDir/$sFile");}}$oDir->close();rmdir($sDir);return true;}return false; }?>Heshan Wanigasooriya
Tags
Links
Comments
Post new comment
Tags in Custom Tags
Web Service
Perl Module
Performacne Test
Ubuntu
Trac
PHP over Jsp
Ruby on Rails
Netbeans
Mac OS X
Facebook
Leopard
NuSOPA
Apple
Webservice
MSN
Drupal
MySQL
PHP vs Jsp
Workflow
JSP
Perl Funciton
NuSOAP
Yahoo
Drupal Modules
Dual Boot
Ubuntu 9.10
Object-Oriented
Wikipedia
OOP
Folder
Gmail
Projet Management
Mobile web
mysqldump
Zend Studio for Eclipse
Pidgin
Perl
PHP Clases
Video Module
Opera mini
Wiki
Unix
PHP
ASP .NET
x-send
PHP JSP Performance
Thread
Drupal Themes
.NET
PHP functions
