|
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, HDFopen will create a new file using the specified access type and number of data descriptors. If given an existing file name, HDFopen will open the file using the specified access type and ignore the n_dds argument. |
|
|
HDF provides several file access code definitions: |
|
|
DFACC_READ - Open for read only. If file does not exist, an error condition results.
DFACC_CREATE - If file exists, delete it, then open a new file for read/write.
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 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, DFACC_WRITE, or DFACC_ALL, HDF will attempt to reopen the file with read and write permissions. |
|
|
Upon successful exit, the named 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. |