Example #1
0
 }
 if ($sourcetype == 'icoid') {
     //是ico时
     $data = array();
     $totalsize = 0;
     $data['gid'] = $gid;
     $data['iscopy'] = $iscopy;
     $icos = $folderids = array();
     //分4种情况:a:本地到api;b:api到api;c:api到本地;d:本地到本地;
     foreach ($icoids as $icoid) {
         //在目标位置创建
         $opath = rawurldecode($icoid);
         $path = rawurldecode(str_replace(array('_dock_', 'icosContainer_folder_', 'icosContainer_body_'), '', $container));
         $return = IO::CopyTo($opath, $path, $iscopy);
         if (!$iscopy) {
             $return = IO::DeleteByData($return);
         }
         if ($return['success'] === true) {
             $data['icoarr'][] = $return['newdata'];
             if (!$tbz) {
                 addtoconfig($return['newdata'], $ticoid);
             }
             if ($return['newdata']['type'] == 'folder') {
                 $data['folderarr'][] = IO::getFolderByIcosdata($return['newdata']);
             }
             $data['successicos'][$return['icoid']] = $return['newdata']['icoid'];
         } else {
             $data['error'][] = $return['name'] . ':' . $return['success'];
         }
     }
     if ($data['successicos']) {