summaryrefslogtreecommitdiffstats
path: root/web/lib/aur.inc
diff options
context:
space:
mode:
authoreric <eric>2004-07-13 00:48:21 +0000
committereric <eric>2004-07-13 00:48:21 +0000
commit56effc6ae4737f955c972177bf3cc0d7a5e320be (patch)
tree92ccf9e36872bf29abcb03728200b9742d9db390 /web/lib/aur.inc
parentcbe2050420a65349a5fcf1f4cce6e7c76490f881 (diff)
downloadaurweb-56effc6ae4737f955c972177bf3cc0d7a5e320be.tar.xz
a little bit more...
Diffstat (limited to 'web/lib/aur.inc')
-rw-r--r--web/lib/aur.inc19
1 files changed, 19 insertions, 0 deletions
diff --git a/web/lib/aur.inc b/web/lib/aur.inc
index 686154f..0db5c12 100644
--- a/web/lib/aur.inc
+++ b/web/lib/aur.inc
@@ -467,5 +467,24 @@ function initeger($inival="0", $isbytes=1) {
return intval($inival) * $multiplier;
}
+# recursive delete directory
+#
+function rm_rf($dirname="") {
+ $d = dir($dirname);
+ while ($f = $d->read()) {
+ if ($f != "." && $f != "..") {
+ if (is_dir($dirname.$f)) {
+ rm_rf($dirname.$f."/");
+ }
+ if (is_file($dirname.$f) || is_link($dirname.$f)) {
+ unlink($dirname.$f);
+ }
+ }
+ }
+ $d->close();
+ rmdir($dirname);
+ return;
+}
+
# vim: ts=2 sw=2 noet ft=php
?>