Puli\Repository\AbstractJsonRepository::ensureDirectoryExists PHP Method

ensureDirectoryExists() private method

Adds all ancestor directories of a path to the repository.
private ensureDirectoryExists ( string $path )
$path string A Puli path.
    private function ensureDirectoryExists($path)
    {
        if (array_key_exists($path, $this->json)) {
            return;
        }
        // Recursively initialize parent directories
        if ('/' !== $path) {
            $this->ensureDirectoryExists(Path::getDirectory($path));
        }
        $this->json[$path] = null;
    }