JonathanTorres\Construct\Helpers\Filesystem::makeDirectory PHP Method

makeDirectory() public method

Create a directory
public makeDirectory ( string $path, boolean $recursive = false ) : boolean
$path string
$recursive boolean Defaults to false.
return boolean
    public function makeDirectory($path, $recursive = false)
    {
        return mkdir($path, 0777, $recursive);
    }

Usage Example

Beispiel #1
0
 /**
  * Generate phpunit test file.
  *
  * @return void
  */
 protected function phpunitTest()
 {
     $file = $this->file->get(__DIR__ . '/stubs/ProjectTest.stub');
     $stubs = ['{project_upper}', '{project_camel_case}', '{vendor_upper}', '{namespace}'];
     $values = [$this->projectUpper, $this->str->toCamelCase($this->projectLower), $this->vendorUpper, $this->createNamespace()];
     $content = str_replace($stubs, $values, $file);
     $this->file->makeDirectory($this->projectLower . '/tests');
     $this->file->put($this->projectLower . '/tests/' . $this->projectUpper . 'Test.php', $content);
     $this->exportIgnores[] = 'tests';
 }
All Usage Examples Of JonathanTorres\Construct\Helpers\Filesystem::makeDirectory