$opts = System::
_parseArgs($args, 'rf'
); // "f" does nothing but I like it :-)
if (PEAR::
isError($opts)) { return System::
raiseError($opts);
} foreach ($opts[0
] as $opt) { if ($opt[0
] == 'r'
) { $do_recursive = true;
} } $ret = true;
if (isset($do_recursive)) { $struct = System::
_multipleToStruct($opts[1
]);
foreach ($struct['files'
] as $file) { if (!@
unlink($file)) { $ret = false;
} } rsort($struct['dirs'
]);
foreach ($struct['dirs'
] as $dir) { if (!@
rmdir($dir)) { $ret = false;
} }