protected function FileSync::ensureFileDirectory in Tome 8
Ensures that the file directory exists.
1 call to FileSync::ensureFileDirectory()
- FileSync::exportFile in modules/
tome_sync/ src/ FileSync.php - Exports a file to the export directory.
File
- modules/
tome_sync/ src/ FileSync.php, line 119
Class
- FileSync
- Handles file import and exports by keeping a file export directory in sync.
Namespace
Drupal\tome_syncCode
protected function ensureFileDirectory() {
$file_directory = $this
->getFileDirectory();
$this->fileSystem
->prepareDirectory($file_directory, FileSystemInterface::CREATE_DIRECTORY);
FileSecurity::writeHtaccess($file_directory);
if (!file_exists($file_directory)) {
throw new StorageException('Failed to create config directory ' . $file_directory);
}
}