/**
  * step 4 :--文件比对--
  * 文件目录可写
  * 文件md5比对
  */
 public function fileAction()
 {
     $success = 1;
     $useFtp = $this->getInput('ftp', 'post');
     if (!$useFtp) {
         $r = PwSystemHelper::checkFolder($this->localFileList);
         if ($r !== true) {
             list(, $folder) = $r;
             PwSystemHelper::log('folder write fail!' . $folder, $this->version);
             $success = 0;
             $lang = Wind::getComponent('i18n');
             $msg = $lang->getMessage('APPCENTER:upgrade.write.fail', array($folder));
             $this->setOutput($msg, 'msg');
         }
     } else {
         try {
             $config = $this->getInput(array('server', 'port', 'user', 'pwd', 'dir', 'sftp'), 'post', true);
             $ftp = $config['sftp'] ? new PwSftpSave($config) : new PwFtpSave($config);
         } catch (WindFtpException $e) {
             $this->showError(array('APPCENTER:upgrade.ftp.fail', array($e->getMessage())), 'appcenter/upgrade/file', true);
         }
         $ftp->close();
         Wekit::cache()->set('system_upgrade_ftp', $config);
     }
     if ($success) {
         list($change, $unchange, $new) = $this->installService->validateLocalFiles($this->localFileList);
         $this->setOutput(array('change' => $change, 'unchange' => $unchange, 'new' => $new));
         Wekit::cache()->set('system_upgrade_step', 4);
         PwSystemHelper::log('file md5 check success', $this->version);
     }
 }