Name: H5Lget_name_by_idx
Signature:
  ssize_t `H5Lget_name_by_idx`( hid_t `loc_id`, const char *`group_name`, H5_index_t `index_field`, H5_iter_order_t `order`, hsize_t `n`, char *`name`, size_t `size`, hid_t `lapl_id` )

Purpose:
  Retrieves name of the nth link in a group, according to the order within a specified field or index.

Description:
  `H5Lget_name_by_idx` retrieves the name of the nth link in a group, according to the specified order, `order`, within a specified field or index, `index_field`.

  If `loc_id` specifies the group in which the link resides, `group_name` can be a dot (.).

  The size in bytes of `name` is specified in `size`. If `size` is unknown, it can be determined via an initial `H5Lget_name_by_idx` call with `name` set to `NULL`; the function's return value will be the size of the name.

Parameters:

  hid_t `loc_id` | IN: File or group identifier specifying location of subject group
  const char *`group_name` | IN: Name of subject group
  H5_index_t `index_field` | IN: Index or field which determines the order
  H5_iter_order_t `order` | IN: Order within field or index
  hsize_t `n` | IN: Link for which to retrieve information
  char *`name` | OUT: Buffer in which link value is returned
  size_t `size` | IN: Size in bytes of `name`
  hid_t `lapl_id` | IN: Link access property list

Returns:
  Returns the size of the link name if successful; otherwise returns a negative value.

Fortran90 Interface: h5lget_name_by_idx_f

      SUBROUTINE h5lget_name_by_idx_f(loc_id, group_name, index_field, order, n, &
            name, hdferr, lapl_id, size)
        IMPLICIT NONE
        INTEGER(HID_T), INTENT(IN) :: loc_id
                                  ! File or group identifier specifying location of
                                  ! subject group
        CHARACTER(LEN=*), INTENT(IN) :: group_name
                                  ! Name of subject group
        INTEGER, INTENT(IN) :: index_field
                                  ! Index or field which determines the order
                                  !  H5_INDEX_UNKNOWN_F   - Unknown index type
                                  !  H5_INDEX_NAME_F      - Index on names
                                  !  H5_INDEX_CRT_ORDER_F - Index on creation order
                                  !  H5_INDEX_N_F         - Number of indices defined
        INTEGER, INTENT(IN) :: order
                                  ! Order in which to iterate over index:
                                  !    H5_ITER_UNKNOWN_F  - Unknown order
                                  !    H5_ITER_INC_F      - Increasing order
                                  !    H5_ITER_DEC_F      - Decreasing order
                                  !    H5_ITER_NATIVE_F   - No particular order,
                                  !                         whatever is fastest

        INTEGER(HSIZE_T), INTENT(IN) :: n
                                  ! Attribute’s position in index
        CHARACTER(LEN=*), INTENT(OUT) :: name
                                  ! Buffer in which link value is returned
        INTEGER, INTENT(OUT) :: hdferr        ! Error code:
                                  ! 0 on success and -1 on failure
        INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size
                                  ! Indicates the size, in the number of characters,
                                  ! of the link, returns exact size
        INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id
                                  ! Link access property list
      END SUBROUTINE h5lget_name_by_idx_f

History:

  Release | C
  1.8.0 | Function introduced in this release.