# PetscViewerHDF5HasGroup
Check whether the current (pushed) group exists in the HDF5 file 
## Synopsis
```
#include "petscviewerhdf5.h" 
PetscErrorCode PetscViewerHDF5HasGroup(PetscViewer viewer, const char path[], PetscBool *has)
```
Collective


## Input Parameters

- ***viewer -*** The `PETSCVIEWERHDF5` viewer
- ***path -*** (Optional) The path relative to the pushed group



## Output Parameter

- ***has -*** Flag for group existence





## Notes
If path starts with '/', it is taken as an absolute path overriding currently pushed group, else path is relative to the current pushed group.
So NULL or empty path means the current pushed group.

If path exists but is not a group, `PETSC_FALSE` is returned.


## See Also
 [](sec_viewers), `PETSCVIEWERHDF5`, `PetscViewerHDF5HasAttribute()`, `PetscViewerHDF5HasDataset()`, `PetscViewerHDF5PushGroup()`, `PetscViewerHDF5PopGroup()`, `PetscViewerHDF5GetGroup()`, `PetscViewerHDF5OpenGroup()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/hdf5/hdf5v.c.html#PetscViewerHDF5HasGroup">src/sys/classes/viewer/impls/hdf5/hdf5v.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/impls/hdf5/hdf5v.c)


[Index of all Viewer routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
