Page tree

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

 

JAVA

FORTRAN

C++

C

 

Link

H5F_IS_ACCESSIBLE

Checks if a file can be opened with a given fapl

Procedure:

H5F_IS_ACCESSIBLE ( filename, fapl_id )

Signature:

htri_t H5Fis_accessible ( const char *filename, hid_t fapl_id )

  SUBROUTINE h5fis_accessible_f(name, status, hdferr, access_prp)
    IMPLICIT NONE
    CHARACTER(LEN=*), INTENT(IN) :: name   ! Name of the file
    LOGICAL, INTENT(OUT) :: status         ! Indicates if file
                                           ! is an HDF5 file
    INTEGER, INTENT(OUT) :: hdferr         ! Error code
    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp
                                           ! File access property list
                                           ! identifier
  END SUBROUTINE h5fis_accessible_f

Parameters:
const char *filenameIN: Name of file
hid_t fapl_idIN: File access property list

Description:

H5F_IS_ACCESSIBLE checks if the file specified by filename can be opened with the fapl fapl_id.

Motivation

The H5F_IS_ACCESSIBLE function enables files to be checked with a given file access property list, unlike H5F_IS_HDF5, which only uses the default file driver when opening a file.

Returns:

Returns a positive value if the specified file can be opened.  Returns 0 if not. 
Returns a negative value when the function fails or if a file does not exist.

Example:

test / vol.c [428:429]  hdf5_1_12  HDFFV/hdf5
    /* H5Fflush */

fortran / test / tH5F.F90 [238:246]  hdf5_1_12  HDFFV/hdf5
          !
          !test whether files are accessible as HDF5 (new, VOL-safe, way)
          !
          CALL h5fis_accessible_f(fix_filename1, status, error)
               CALL check("h5fis_accessible_f",error,total_error)
          IF ( .NOT. status ) THEN
              write(*,*) "File ", fix_filename1, " is not accessible as hdf5"
              stop
          END IF

History:
ReleaseChange
1.12.0Function introduced in this release

--- Last Modified: June 02, 2020 | 09:34 AM