Page tree

 

JAVA

FORTRAN

C++

C

 

Link

H5F_GET_FILESIZE

Returns the size of an HDF5 file

Procedure:

H5F_GET_FILESIZE(file_id, size)

Signature:

herr_t H5Fget_filesize( hid_t file_id, hsize_t *size )

SUBROUTINE h5fget_filesize_f(file_id, size, hdferr)

  IMPLICIT NONE
  INTEGER(HID_T), INTENT(IN) :: file_id    ! file identifier
  INTEGER(HSIZE_T), INTENT(OUT) :: size    ! Size of the file 
  INTEGER, INTENT(OUT) :: hdferr           ! Error code: 0 on success,
                                           ! -1 if fail
END SUBROUTINE h5fget_filesize_f

Parameters:
hid_t file_idIN: Identifier of a currently-open HDF5 file
hsize_t *size

OUT: Size of the file, in bytes

Description:

H5F_GET_FILESIZE returns the size of the HDF5 file specified by file_id.

The returned size is that of the entire file, as opposed to only the HDF5 portion of the file. I.e., size includes the user block, if any, the HDF5 portion of the file, and any data that may have been appended beyond the data written through the HDF5 library.

Returns:

Returns a non-negative value if successful; otherwise returns a negative value. 

Example:

    /*
     * Obtain and print the file size.
     */
    status = H5Fget_filesize (file, &size);
    printf ("File size for %s is: %d bytes\n\n", FILE1, (int)size);

  ! Obtain and print the file size.
  !
  CALL h5fget_filesize_f(file, size, hdferr)
  WRITE(*,'("File size for ",A," is: ",i6," bytes",/)') filename1, size

History:
Release    Change
1.6.3Function introduced in this release.
Fortran subroutine introduced in this release.

--- Last Modified: December 20, 2018 | 01:48 PM