Syntax
| Visual Basic (Declaration) |
|---|
Public Shared Function create ( _ groupOrFileId As H5LocId, _ groupName As String, _ sizeHint As UInteger _ ) As H5GroupId |
| C# |
|---|
public static H5GroupId create ( H5LocId groupOrFileId, string groupName, uint sizeHint ) |
| C++ |
|---|
public: static H5GroupId^ create ( H5LocId^ groupOrFileId, String^ groupName, unsigned int sizeHint ) |
Parameters
- groupOrFileId (H5LocId)
- IN: provides a group or file id.
- groupName (String)
- IN: Absolute or relative name of the new group.
- sizeHint (UInt32)
- IN: Optional parameter indicating the number of bytes to reserve for the names that will appear in the group. A conservative estimate could result in multiple system-level I/O requests to read the group name heap; a liberal estimate could result in a single large I/O request even when the group has just a few names. HDF5 stores each name with a null terminator.
Return Value
Returns a valid group identifier
Remarks
H5G.create creates a new group with the specified name at the specified location, loc_id. The location is identified by a file or group identifier. The name must not already be taken by some other object and all parent groups must already exist.
size_hint is a hint for the number of bytes to reserve to store the names which will be eventually added to the new group. Passing a value of zero for size_hint is usually adequate since the library is able to dynamically resize the name heap, but a correct hint may result in better performance. If a non-positive value is supplied for size_hint, then a default size is chosen.
The return value is a group identifier for the open group. This group identifier should be closed by calling H5G.close when it is no longer needed.
Exceptions
| Exception | Condition |
|---|---|
| throws H5GcreateException if the creation fails. |