Puli\Repository\InMemoryRepository::ensureDirectoryExists PHP Method

ensureDirectoryExists() private method

Recursively creates a directory for a path.
private ensureDirectoryExists ( string $path )
$path string A directory path.
    private function ensureDirectoryExists($path)
    {
        if (!isset($this->resources[$path])) {
            // Recursively initialize parent directories
            if ($path !== '/') {
                $this->ensureDirectoryExists(Path::getDirectory($path));
            }
            $this->resources[$path] = new GenericResource($path);
            $this->resources[$path]->attachTo($this);
            return;
        }
    }