Return to utils.inc CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / zip / tests |
1.1 misho 1: <?php
1.1.1.2 ! misho 2: /* $Id$ */
1.1 misho 3: function dump_entries_name($z) {
4: for($i=0; $i<$z->numFiles; $i++) {
5: $sb = $z->statIndex($i);
6: echo $i . ' ' . $sb['name'] . "\n";
7: }
8: }
9: /* recursively remove a directoryy */
10: function rmdir_rf($dir) {
11: if ($handle = opendir($dir)) {
12: while (false !== ($item = readdir($handle))) {
13: if ($item != "." && $item != "..") {
14: if (is_dir($dir . '/' . $item)) {
15: rmdir_rf($dir . '/' . $item);
16: } else {
17: unlink($dir . '/' . $item);
18: }
19: }
20: }
21: closedir($handle);
22: rmdir($dir);
23: }
24: }