src/GameOfLife/Utils/FileSystem/FileSystemWriter.php
/**
     * Creates a directory if it doesn't exist yet.
     *
     * @param string $_directoryPath The directory path
     *
     * @throws \Exception The exception when the target directory already exists
     */
Creates a directory if it doesn't exist yet.
@param string $_directoryPath The directory path

@throws \Exception The exception when the target directory already exists
Creates a directory if it doesn ' t exist yet . @param string $_directoryPath The directory path @throws \ Exception The exception when the target directory already exists
public function createDirectory(string $_directoryPath)
    {
        $directoryPath = $this->convertSlashes($_directoryPath);
        if (! file_exists($directoryPath))
        {
            mkdir($directoryPath, 0777, true);
            if (! file_exists($directoryPath))
            {
                throw new \Exception("Unknown error while creating the directory \"" . $directoryPath . "\".");
            }
        }
        else throw new \Exception("The directory \"" . $directoryPath . "\" already exists.");
    }
public function createDirectory ( string $ _directoryPath ) { $ directoryPath = $ this -> convertSlashes ( $ _directoryPath ) ; if ( ! file_exists ( $ directoryPath ) ) { mkdir ( $ directoryPath , 0777 , true ) ; if ( ! file_exists ( $ directoryPath ) ) { throw new \ Exception ( " Unknown error while creating the directory  \" " . $ directoryPath . " \" . " ) ; } } else throw new \ Exception ( " The directory  \" " . $ directoryPath . " \"  already exists. " ) ; }
Creates a directory if it doesn't exist yet.
Creates a directory if it doesn ' t exist yet .
// create all directories in the directory path recursively (if they don't exist)