Page tree

The license could not be verified: License Certificate has expired!

 

JAVA

FORTRAN

C++

C

 

Link

H5F_GET_FILENO

Retrieves a file's file number that uniquely identifies an open file

Procedure:

H5F_GET_FILENO ( file_id, fnumber )

Signature:

herr_t H5Fget_fileno (hid_t file_id, unsigned long *fnumber )

  SUBROUTINE h5fget_fileno_f(file_id, fileno, hdferr)
    IMPLICIT NONE
    INTEGER(HID_T), INTENT(IN) :: file_id  ! file identifier
    INTEGER, INTENT(OUT) :: fileno         ! File number
    INTEGER, INTENT(OUT) :: hdferr         ! Error code: 0 on success,
                                           !     -1 if fail
 END SUBROUTINE h5fget_fileno_f

Parameters
hid_t file_idIN: The file identifier
unsigned long *fnumberIN: A pointer to the file

Description:

H5F_GET_FILENO retrieves a file number for a file specified by the file identifier file_id and the pointer fnumber to the file.

Returns:

Returns SUCCEED or FAIL.

Example:

test / tfile.c [2120:2130]  hdf5_1_12  HDFFV/hdf5
    /* Check the file numbers */
    fileno1 = 0;
    ret = H5Fget_fileno(fid1, &fileno1);
    CHECK(ret, FAIL, "H5Fget_fileno");
    fileno2 = 0;
    ret = H5Fget_fileno(fid2, &fileno2);
    CHECK(ret, FAIL, "H5Fget_fileno");
    VERIFY(fileno1, fileno2, "H5Fget_fileno");

    /* Check that a file number pointer of NULL is ignored */
    ret = H5Fget_fileno(fid1, NULL);

fortran / test / tH5F.F90 [295:304]  hdf5_1_12  HDFFV/hdf5
          !
          !Check file numbers
          !
          CALL h5fget_fileno_f(file1_id, file_num1, error)
               CALL check("h5fget_fileno_f",error,total_error)
          CALL h5fget_fileno_f(file2_id, file_num2, error)
               CALL check("h5fget_fileno_f",error,total_error)
          IF(file_num1 .EQ. file_num2) THEN
               write(*,*) "file numbers aren't supposed to match"
          END IF

History:
ReleaseChange
1.12.0Function introduced.

--- Last Modified: February 24, 2020 | 08:42 AM