You are here

public function MergeYaml::prepareOutputDir in Database Sanitize 7

Creates the output directory if doesn't exist.

1 call to MergeYaml::prepareOutputDir()
MergeYaml::createMergeFiles in vendor/edisonlabs/merge-yaml/src/MergeYaml.php
Create the merge files.

File

vendor/edisonlabs/merge-yaml/src/MergeYaml.php, line 61

Class

MergeYaml
Main class for merge-yaml.

Namespace

EdisonLabs\MergeYaml

Code

public function prepareOutputDir() {

  // Check if the output directory exists and try to create it if it doesn't.
  if (!is_dir($this->outputDir) && !mkdir($this->outputDir, 0700)) {
    throw new \RuntimeException(sprintf('Output directory does not exist and it was not able to be created: %s.', $this->outputDir));
  }
}