/** * Create an export file * * @return bool if file operation could done successfully */ protected function createExportFile() { BasicFileUtility::createFolderIfNotExists($this->getStorageFolder(true)); return GeneralUtility::writeFile($this->getAbsolutePathAndFileName(), $this->getFileContent(), true); }
/** * Render Link to Captcha Image * * @param Field $field * @return string|null * @throws \Exception */ public function render(Field $field) { if ($this->configurationExists()) { $this->setBackgroundImage($this->configuration['captcha.']['default.']['image'])->setFontPathAndFilename($this->configuration['captcha.']['default.']['font'])->setPathAndFilename($field); BasicFileUtility::createFolderIfNotExists($this->getImagePath(true)); $captchaValue = $this->getStringAndResultForCaptcha(); SessionUtility::setCaptchaSession($captchaValue['result'], $field->getUid()); return $this->createImage($captchaValue['string']); } return null; }
/** * Create an upload folder * * @return void */ public function fixUploadFolderAction() { BasicFileUtility::createFolderIfNotExists(GeneralUtility::getFileAbsFileName('uploads/tx_powermail/')); $this->redirect('checkBe'); }
/** * Log Spam Notification * * @param Mail $mail * @return void */ protected function logSpamNotification(Mail $mail) { if (empty($this->settings['spamshield.']['logfileLocation'])) { return; } BasicFileUtility::createFolderIfNotExists(BasicFileUtility::getPathFromPathAndFilename($this->settings['spamshield.']['logfileLocation'])); $logMessage = $this->createSpamNotificationMessage($this->settings['spamshield.']['logTemplate'], $this->getVariablesForSpamNotification($mail)); BasicFileUtility::prependContentToFile($this->settings['spamshield.']['logfileLocation'], $logMessage); }