Exemplo n.º 1
0
 public static function assets($options = null)
 {
     $path = conf::pathBase() . "/htdocs/files/default/cached_assets";
     if (file_exists($path)) {
         file::rrmdir($path);
     }
     return 1;
 }
Exemplo n.º 2
0
 /**
  * remove directory recursively
  * @param string $path 
  */
 public static function rrmdir($dir)
 {
     $fp = opendir($dir);
     if ($fp) {
         while ($f = readdir($fp)) {
             $file = $dir . "/" . $f;
             if ($f == "." || $f == "..") {
                 continue;
             } else {
                 if (is_dir($file) && !is_link($file)) {
                     file::rrmdir($file);
                 } else {
                     unlink($file);
                 }
             }
         }
         closedir($fp);
         rmdir($dir);
     }
 }