/** * Change directory * @param string $directory Directory path * @return bool true if directory change success * @throws CException if directory change fails */ public function changeDirectory($directory) { if ($this->objSftp->chdir($directory)) { return true; } else { throw new CException(Yii::t('XSFtp.sftp', 'Directory change failed.')); } }