function Fixtures::mkTmpDir

Creates a temporary directory.

Parameters

string $prefix: A prefix for the temporary directory name.

Return value

string Path to temporary directory

File

core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php, line 286

Class

Fixtures
Convenience class for creating fixtures.

Namespace

Drupal\Tests\Composer\Plugin\Scaffold

Code

public function mkTmpDir($prefix) {
  $tmpDir = $this->tmpDir($prefix);
  $filesystem = new Filesystem();
  $filesystem->ensureDirectoryExists($tmpDir);
  return $tmpDir;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.