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;
    }
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;
    }
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 ; }
Adds all ancestor directories of a path to the repository.

@param string $path A Puli path.
Adds all ancestor directories of a path to the repository .