コード例 #1
0
 public static function recursive_copy($source, $target)
 {
     if (is_dir($source)) {
         @mkdir($target);
         $d = dir($source);
         while (false !== ($entry = $d->read())) {
             if ($entry == '.' || $entry == '..' || $entry == 'temp') {
                 continue;
             }
             $Entry = $source . '/' . $entry;
             if (is_dir($Entry)) {
                 InnomaticSetup::recursive_copy($Entry, $target . '/' . $entry);
                 continue;
             }
             copy($Entry, $target . '/' . $entry);
         }
         $d->close();
     } else {
         copy($source, $target);
     }
 }