Sets an initial file image in a memory buffer
Procedure:
H5P_SET_FILE_IMAGE ( fapl_id, buf_ptr, buf_len )
Signature:
herr_t H5Pset_file_image(
hid_t fapl_id,
void *buf_ptr,
size_t buf_len
)
Fortran2003 Interface: h5pset_file_image_f
Signature:
SUBROUTINE h5pset_file_image_f(fapl_id, buf_ptr, buf_len, hdferr)
USE iso_c_binding
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN) :: fapl_id
TYPE(C_PTR) , INTENT(IN) :: buf_ptr
INTEGER(SIZE_T), INTENT(IN) :: buf_len
INTEGER , INTENT(OUT) :: hdferr
Inputs:
fapl_id - File access property list identifier
buf_ptr - Pointer to the initial file image,
or C_NULL_PTR if no initial file image is desired
buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired
Outputs:
hdferr - Returns 0 if successful and -1 if fails
Parameters:
hid_t fapl_id | IN: File access property list identifier |
void *buf_ptr | IN: Pointer to the initial file image, or NULL if no initial file image is desired |
size_t buf_len | IN: Size of the supplied buffer, or 0 (zero) if no initial image is desired |
Description:
H5P_SET_FILE_IMAGE allows an application to provide a file image to be used as the initial contents of a file. Calling H5P_SET_FILE_IMAGE makes a copy of the buffer specified in buf_ptr
of size buf_len
.
Motivation: H5P_SET_FILE_IMAGE and other elements of HDF5 are used to load an image of an HDF5 file into system memory and open that image as a regular HDF5 file. An application can then use the file without the overhead of disk I/O.
Recommended Reading: This function is part of the file image operations feature set. It is highly recommended to study the guide HDF5 File Image Operations before using this feature set. See the “See Also” section below for links to other elements of HDF5 file image operations.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value.
Example:
See Also:
History:
Release | Change |
---|
1.8.13 | Fortran subroutine added in this release. |
1.8.9 | C function introduced in this release. |
--- Last Modified: July 25, 2019 | 02:43 PM