makeDirectory() публичный Метод

public makeDirectory ( string $path )
$path string
Пример #1
0
 public function generate($moduleName)
 {
     if ($this->moduleFileExists($moduleName)) {
         return;
     }
     $values = array('%module_name%' => $moduleName, '%code_pool%' => $this->codePool);
     if (!$this->fileSystem->pathExists($this->path)) {
         $this->fileSystem->makeDirectory($this->path);
     }
     $this->fileSystem->putFileContents($this->getFilePath($moduleName), strtr(file_get_contents(__DIR__ . '/templates/module.template'), $values));
 }
Пример #2
0
 /**
  * @param string $filepath
  */
 private function createDirectoryIfItDoesExist($filepath)
 {
     $path = dirname($filepath);
     if (!$this->filesystem->isDirectory($path)) {
         $this->filesystem->makeDirectory($path);
     }
 }
Пример #3
0
 /**
  * @param string $xml
  */
 private function writeConfigFile($xml)
 {
     if (!$this->filesystem->isDirectory($this->directory)) {
         $this->filesystem->makeDirectory($this->directory);
     }
     $this->filesystem->putFileContents($this->getFilePath(), $xml);
 }