Puli\Repository\AbstractJsonRepository::hasChildren PHP Method

hasChildren() public method

public hasChildren ( $path )
    public function hasChildren($path)
    {
        if (null === $this->json) {
            $this->load();
        }
        $path = $this->sanitizePath($path);
        $results = $this->getReferencesInDirectory($path, self::STOP_ON_FIRST);
        if (empty($results)) {
            $pathResults = $this->getReferencesForPath($path);
            if (empty($pathResults)) {
                throw ResourceNotFoundException::forPath($path);
            }
            return false;
        }
        return true;
    }