コード例 #1
0
 /**
  * Crée une arborescence (vérifie son existence) en fonction du chemin indiqué
  */
 static function createPath($path, $mod = 0777)
 {
     $path_pieces = explode(DS, $path);
     $path = '';
     while (!is_null($piece = array_shift($path_pieces))) {
         $path .= $piece . DS;
         if (!is_dir($path)) {
             FileAndDir::createDirectory($path, $mod);
         }
     }
 }