示例#1
0
 /**
  * Renames a file or a directory on the SFTP server
  * @param string $oldname
  * @param string $newname
  * @return bool true if rename success
  * @throws CException if rename fails
  */
 public function rename($oldname, $newname)
 {
     if ($this->objSftp->rename($oldname, $newname)) {
         return true;
     } else {
         throw new CException(Yii::t('XSFtp.sftp', 'Rename failed.'));
     }
 }