You are here

public static function ExportEntityWriter::getGeneratorDir in Content Synchronizer 3.x

Return the generator dir.

Return value

string The generator dir.

5 calls to ExportEntityWriter::getGeneratorDir()
ArchiveDownloader::redirectWithArchivePath in src/Service/ArchiveDownloader.php
Redirect to the page with download.
ArchiveDownloaderController::downloadArchive in src/Controller/ArchiveDownloaderController.php
Download the tmp file.
ContentSynchronizerManager::cleanTemporaryFiles in src/Service/ContentSynchronizerManager.php
Clean temporary files.
ExportEntityWriter::getDirPath in src/Processors/ExportEntityWriter.php
Return the directory path.
ImportEntity::getArchiveFilesPath in src/Entity/ImportEntity.php
Return the working directory path.

File

src/Processors/ExportEntityWriter.php, line 54

Class

ExportEntityWriter
Export entity writer.

Namespace

Drupal\content_synchronizer\Processors

Code

public static function getGeneratorDir() {
  if (!static::$generatorDir) {
    static::$generatorDir = 'temporary://content_synchronizer';
    try {
      static::$generatorDir .= '_' . exec('whoami') . '/';
    } catch (\Exception $e) {
      static::$generatorDir .= '/';
    }
  }
  return static::$generatorDir;
}