You are here

protected function JsonWriterTrait::createDirectory in Content Synchronizer 8.2

Same name and namespace in other branches
  1. 8 src/Base/JsonWriterTrait.php \Drupal\content_synchronizer\Base\JsonWriterTrait::createDirectory()
  2. 3.x src/Base/JsonWriterTrait.php \Drupal\content_synchronizer\Base\JsonWriterTrait::createDirectory()

Create a directory if not exists.

3 calls to JsonWriterTrait::createDirectory()
FileProcessor::getExportAssetsDir in src/Plugin/content_synchronizer/entity_processor/FileProcessor.php
Return the export assets path.
JsonWriterTrait::createDirTreeForFileDest in src/Base/JsonWriterTrait.php
Create a directory tree.
JsonWriterTrait::writeJson in src/Base/JsonWriterTrait.php
Save json in the destination file.

File

src/Base/JsonWriterTrait.php, line 37

Class

JsonWriterTrait
Json writer tool.

Namespace

Drupal\content_synchronizer\Base

Code

protected function createDirectory($dir) {
  if (!is_dir($dir)) {
    file_prepare_directory($dir, FILE_CREATE_DIRECTORY);
  }
}