/** * Remove file on sftp location * @param string $file Remote file path * @return bool true if file removal success * @throws CException if file removal fails */ function removeFile($file) { if ($this->objSftp->delete($file)) { return true; } else { throw new CException(Yii::t('XSFtp.sftp', 'File removal failed.')); } }