|
Purpose
|
Provides an access path to an HDF file by reading all the data descriptor blocks into memory. |
|
Return value
|
Returns the file identifier if successful and FAIL (or -1) otherwise. |
|
Description
|
If given a new file name, Hopen will create a new file using the specified access type and number of data descriptors. If given an existing file name, Hopen will open the file using the specified access type and ignore the n_dds argument. |
|
|
The number of data descriptors in a block, n_dds, is a non-negative integer with a default value of DEF_NDDS (or 16 ) and a minimum value of MIN_NDDS (or 4 ). If the specified value of n_dds is less than MIN_NDDS , then it will be set to MIN_NDDS . |
|
|
HDF provides several access code definitions: |
|
|
DFACC_CREATE - If file exists, delete it, then open a new file for read/write.
DFACC_READ - Open for read only. If file does not exist, error.
DFACC_WRITE - Open for read/write. If file does not exist, create it. |
|
|
If a file is opened and an attempt is made to reopen the file using DFACC_CREATE , HDF will issue the error code DFE_ALROPEN. If the file is opened with read-only access and an attempt is made to reopen the file for write access using DFACC_RDWR or DFACC_WRITE , HDF will attempt to reopen the file with read and write permissions. |
|
|
Upon successful exit, the specified file is opened with the relevant permissions, the data descriptors are set up in memory, and the associated file_id is returned. For new files, the appropriate file headers are also set up. |