public function createDir($name = null)
    {
        unlink($dir = $this->createFile());

        if (false === mkdir($dir)) {
            throw FileSystemException::lastError($dir);
        }

        if (null !== $name) {
            $dir .= DIRECTORY_SEPARATOR . $name;

            if (false === mkdir($dir)) {
                throw FileSystemException::lastError($dir);
            }
        }

        return $dir;
    }
public function createDir($name = null)
    {
        unlink($dir = $this->createFile());

        if (false === mkdir($dir)) {
            throw FileSystemException::lastError($dir);
        }

        if (null !== $name) {
            $dir .= DIRECTORY_SEPARATOR . $name;

            if (false === mkdir($dir)) {
                throw FileSystemException::lastError($dir);
            }
        }

        return $dir;
    }
public function createDir ( $ name = null ) { unlink ( $ dir = $ this -> createFile ( ) ) ; if ( false === mkdir ( $ dir ) ) { throw FileSystemException :: lastError ( $ dir ) ; } if ( null !== $ name ) { $ dir .= DIRECTORY_SEPARATOR . $ name ; if ( false === mkdir ( $ dir ) ) { throw FileSystemException :: lastError ( $ dir ) ; } } return $ dir ; }
Creates a temporary directory path that will be automatically purged
at the end of the test.

@param string $name The directory name.

@return string The directory path.

@throws FileSystemException If the directory could not be created.
Creates a temporary directory path that will be automatically purged at the end of the test .