HDF5 1.14.5
API Reference
|
Use the functions in this module to manage HDF5 files.
In the code snippets below, we show the skeletal life cycle of an HDF5 file, when creating a new file (left) or when opening an existing file (right). File creation is essentially controlled through File Creation Properties, and file access to new and existing files is controlled through File Access Properties. The file name
and creation or access mode
control the interaction with the underlying storage such as file systems.
Create | Read |
---|---|
hid_t H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id) Creates an HDF5 file. hid_t H5Pcreate(hid_t cls_id) Creates a new property list as an instance of a property list class. | herr_t H5Fget_filesize(hid_t file_id, hsize_t *size) Returns the size of an HDF5 file (in bytes) hid_t H5Fopen(const char *filename, unsigned flags, hid_t fapl_id) Opens an existing HDF5 file. |
Update | Delete |
herr_t H5Lcreate_hard(hid_t cur_loc, const char *cur_name, hid_t dst_loc, const char *dst_name, hid_t lcpl_id, hid_t lapl_id) Creates a hard link to an object. |
In addition to general file management functions, there are three categories of functions that deal with advanced file management tasks and use cases:
Modules | |
Metadata Cache | |
Parallel | |
Single Writer Multiple Readers | |
Macros | |
#define | H5Fget_info H5Fget_info2 |
Functions | |
htri_t | H5Fis_accessible (const char *container_name, hid_t fapl_id) |
Checks if a file can be opened with a given file access property list. | |
hid_t | H5Fcreate (const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id) |
Creates an HDF5 file. | |
hid_t | H5Fopen (const char *filename, unsigned flags, hid_t fapl_id) |
Opens an existing HDF5 file. | |
hid_t | H5Freopen (hid_t file_id) |
Returns a new identifier for a previously-opened HDF5 file. | |
herr_t | H5Fflush (hid_t object_id, H5F_scope_t scope) |
Flushes all buffers associated with a file to storage. | |
herr_t | H5Fclose (hid_t file_id) |
Terminates access to an HDF5 file. | |
herr_t | H5Fdelete (const char *filename, hid_t fapl_id) |
Deletes an HDF5 file. | |
hid_t | H5Fget_create_plist (hid_t file_id) |
Returns a file creation property list identifier. | |
hid_t | H5Fget_access_plist (hid_t file_id) |
Returns a file access property list identifier. | |
herr_t | H5Fget_intent (hid_t file_id, unsigned *intent) |
Determines the read/write or read-only status of a file. | |
herr_t | H5Fget_fileno (hid_t file_id, unsigned long *fileno) |
Retrieves a file's file number that uniquely identifies an open file. | |
ssize_t | H5Fget_obj_count (hid_t file_id, unsigned types) |
Returns the number of open object identifiers for an open file. | |
ssize_t | H5Fget_obj_ids (hid_t file_id, unsigned types, size_t max_objs, hid_t *obj_id_list) |
Returns a list of open object identifiers. | |
herr_t | H5Fget_vfd_handle (hid_t file_id, hid_t fapl, void **file_handle) |
Returns pointer to the file handle from the virtual file driver. | |
herr_t | H5Fmount (hid_t loc_id, const char *name, hid_t child, hid_t plist) |
Mounts an HDF5 file. | |
herr_t | H5Funmount (hid_t loc_id, const char *name) |
Un-mounts an HDF5 file. | |
hssize_t | H5Fget_freespace (hid_t file_id) |
Returns the amount of free space in a file (in bytes) | |
herr_t | H5Fget_filesize (hid_t file_id, hsize_t *size) |
Returns the size of an HDF5 file (in bytes) | |
herr_t | H5Fget_eoa (hid_t file_id, haddr_t *eoa) |
Retrieves the file's end-of-allocation (EOA) | |
herr_t | H5Fincrement_filesize (hid_t file_id, hsize_t increment) |
Sets the file' EOA to the maximum of (EOA, EOF) + increment. | |
ssize_t | H5Fget_file_image (hid_t file_id, void *buf_ptr, size_t buf_len) |
Retrieves a copy of the image of an existing, open file. | |
ssize_t | H5Fget_name (hid_t obj_id, char *name, size_t size) |
Retrieves name of file to which object belongs. | |
herr_t | H5Fget_info2 (hid_t obj_id, H5F_info2_t *file_info) |
Retrieves global file information. | |
ssize_t | H5Fget_free_sections (hid_t file_id, H5F_mem_t type, size_t nsects, H5F_sect_info_t *sect_info) |
Retrieves free-space section information for a file. | |
herr_t | H5Fclear_elink_file_cache (hid_t file_id) |
Clears the external link open file cache. | |
herr_t | H5Fset_libver_bounds (hid_t file_id, H5F_libver_t low, H5F_libver_t high) |
Enables the switch of version bounds setting for a file. | |
herr_t | H5Freset_page_buffering_stats (hid_t file_id) |
Resets the page buffer statistics. | |
herr_t | H5Fget_page_buffering_stats (hid_t file_id, unsigned accesses[2], unsigned hits[2], unsigned misses[2], unsigned evictions[2], unsigned bypasses[2]) |
Retrieves statistics about page access when it is enabled. | |
herr_t | H5Fget_dset_no_attrs_hint (hid_t file_id, hbool_t *minimize) |
Retrieves the setting for whether or not a file will create minimized dataset object headers. | |
herr_t | H5Fset_dset_no_attrs_hint (hid_t file_id, hbool_t minimize) |
Sets the flag to create minimized dataset object headers. | |
herr_t | H5Fget_info1 (hid_t obj_id, H5F_info1_t *file_info) |
Retrieves global file information. | |
herr_t | H5Fset_latest_format (hid_t file_id, hbool_t latest_format) |
Sets the latest version of the library to be used for writing objects. | |
htri_t | H5Fis_hdf5 (const char *file_name) |
Determines whether a file is in the HDF5 format. | |
#define H5Fget_info H5Fget_info2 |
H5Fget_info() is a macro that is mapped to either H5Fget_info1() or H5Fget_info2().
Clears the external link open file cache.
[in] | file_id | File identifier |
H5Fclear_elink_file_cache() evicts all the cached child files in the specified file's external file cache, causing them to be closed if there is nothing else holding them open.
H5Fclear_elink_file_cache() does not close the cache itself; subsequent external link traversals from the parent file will again cache the target file. See H5Pset_elink_file_cache_size() for information on closing the file cache.
Terminates access to an HDF5 file.
[in] | file_id | File identifier |
H5Fclose() terminates access to an HDF5 file (specified by file_id
) by flushing all data to storage.
If this is the last file identifier open for the file and no other access identifier is open (e.g., a dataset identifier, group identifier, or shared datatype identifier), the file will be fully closed and access will end.
data_sample
is open when H5Fclose() is called for the file containing it, data_sample
will remain open and accessible (including writable) until it is explicitly closed. The file will be automatically closed once all objects in the file have been closed.Creates an HDF5 file.
[in] | filename | Name of the file to create |
[in] | flags | File access flags. Allowable values are:
|
[in] | fcpl_id | File creation property list identifier |
[in] | fapl_id | File access property list identifier |
H5Fcreate() is the primary function for creating HDF5 files; it creates a new HDF5 file with the specified name and property lists.
The filename
parameter specifies the name of the new file.
The flags
parameter specifies whether an existing file is to be overwritten. It should be set to either H5F_ACC_TRUNC to overwrite an existing file or H5F_ACC_EXCL, instructing the function to fail if the file already exists.
New files are always created in read-write mode, so the read-write and read-only flags, H5F_ACC_RDWR and H5F_ACC_RDONLY, respectively, are not relevant in this function. Further note that a specification of H5F_ACC_RDONLY will be ignored; the file will be created in read-write mode, regardless.
More complex behaviors of file creation and access are controlled through the file creation and file access property lists, fcpl_id
and fapl_id
, respectively. The value of H5P_DEFAULT for any property list value indicates that the library should use the default values for that appropriate property list.
The return value is a file identifier for the newly-created file; this file identifier should be closed by calling H5Fclose() when it is no longer needed.
|), but it is used only by HDF5 library developers; it is neither tested nor supported for use in applications.Deletes an HDF5 file.
[in] | filename | Name of the file to delete |
[in] | fapl_id | File access property list identifier |
H5Fdelete() deletes an HDF5 file filename
with a file access property list fapl_id
. The fapl_id
should be configured with the same VOL connector or VFD that was used to open the file.
This API was introduced for use with the Virtual Object Layer (VOL). With the VOL, HDF5 "files" can map to arbitrary storage schemes such as object stores and relational database tables. The data created by these implementations may be inconvenient for a user to remove without a detailed knowledge of the storage scheme. H5Fdelete() gives VOL connector authors the ability to add connector-specific delete code to their connectors so that users can remove these "files" without detailed knowledge of the storage scheme.
For a VOL connector, H5Fdelete() deletes the file in a way that makes sense for the specified VOL connector.
For the native HDF5 connector, HDF5 files will be deleted via the VFDs, each of which will have to be modified to delete the files it creates.
For all implementations, H5Fdelete() will first check if the file is an HDF5 file via H5Fis_accessible(). This is done to ensure that H5Fdelete() cannot be used as an arbitrary file deletion call.
herr_t H5Fflush | ( | hid_t | object_id, |
H5F_scope_t | scope | ||
) |
Flushes all buffers associated with a file to storage.
[in] | object_id | Location identifier |
[in] | scope | The scope of the flush action |
H5Fflush() causes all buffers associated with a file to be immediately flushed to storage without removing the data from the cache.
object_id
can be any object associated with the file, including the file itself, a dataset, a group, an attribute, or a named datatype.
scope
specifies whether the scope of the flush action is global or local. Valid values are as follows:
H5F_SCOPE_GLOBAL | Flushes the entire virtual file |
H5F_SCOPE_LOCAL | Flushes only the specified file |
Returns a file access property list identifier.
[in] | file_id | File identifier |
H5Fget_access_plist() returns the file access property list identifier of the specified file.
Returns a file creation property list identifier.
[in] | file_id | File identifier |
H5Fget_create_plist() returns the file creation property list identifier identifying the creation properties used to create this file. This function is useful for duplicating properties when creating another file.
The creation property list identifier should be released with H5Pclose().
Retrieves the setting for whether or not a file will create minimized dataset object headers.
[in] | file_id | File identifier |
[out] | minimize | Flag indicating whether the library will or will not create minimized dataset object headers |
H5Fget_dset_no_attrs_hint() retrieves the no dataset attributes hint setting for the file specified by the file identifier file_id
. This setting is used to inform the library to create minimized dataset object headers when true
.
The setting's value is returned in the boolean pointer minimized.
Retrieves the file's end-of-allocation (EOA)
[in] | file_id | File identifier |
[out] | eoa | The file's EOA |
H5Fget_eoa() retrieves the file's EOA and returns it in the parameter eoa.
Retrieves a copy of the image of an existing, open file.
[in] | file_id | File identifier |
[out] | buf_ptr | Pointer to the buffer into which the image of the HDF5 file is to be copied. If buf_ptr is NULL, no data will be copied but the function's return value will still indicate the buffer size required (or a negative value on error). |
[out] | buf_len | Size of the supplied buffer |
H5Fget_file_image() retrieves a copy of the image of an existing, open file. This routine can be used with files opened using the SEC2 (or POSIX), STDIO, and Core (or Memory) virtual file drivers (VFDs).
If the return value of H5Fget_file_image() is a positive value, it will be the length in bytes of the buffer required to store the file image. So if the file size is unknown, it can be safely determined with an initial H5Fget_file_image() call with buf_ptr set to NULL. The file image can then be retrieved with a second H5Fget_file_image() call with buf_len
set to the initial call's return value.
While the current file size can also be retrieved with H5Fget_filesize(), that call may produce a larger value than is needed. The value returned by H5Fget_filesize() includes the user block, if it exists, and any unallocated space at the end of the file. It is safe in all situations to get the file size with H5Fget_file_image() and it often produces a value that is more appropriate for the size of a file image buffer.
Retrieves a file's file number that uniquely identifies an open file.
[in] | file_id | File identifier |
[out] | fileno | A buffer to hold the file number |
H5Fget_fileno() retrieves a file number for a file specified by the file identifier file_id
and the pointer fnumber
to the file number.
This file number is the same for all open instances of the same file, as long as 1. The active VFD implements the file comparison operator, and 2. The current filesystem is able to determine if the same file is opened more than once. If these conditions are not met, it is the application's responsibility to avoid opening multiple handles into the same file, which results in undefined behavior.
Returns the size of an HDF5 file (in bytes)
[in] | file_id | File identifier |
[out] | size | Size of the file, in bytes |
H5Fget_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.
ssize_t H5Fget_free_sections | ( | hid_t | file_id, |
H5F_mem_t | type, | ||
size_t | nsects, | ||
H5F_sect_info_t * | sect_info | ||
) |
Retrieves free-space section information for a file.
[in] | file_id | File identifier |
[in] | type | The file memory allocation type |
[in] | nsects | The number of free-space sections |
[out] | sect_info | Array of instances of H5F_sect_info_t in which the free-space section information is to be returned |
H5Fget_free_sections() retrieves free-space section information for the free-space manager with type that is associated with file file_id
. If type is H5FD_MEM_DEFAULT, this routine retrieves free-space section information for all the free-space managers in the file.
Valid values for type
are the following:
H5FD_MEM_DEFAULT | The default file memory allocation type |
H5FD_MEM_SUPER | File memory allocated for Superblock |
H5FD_MEM_BTREE | File memory allocated for B-tree |
H5FD_MEM_DRAW | File memory allocated for raw data |
H5FD_MEM_GHEAP | File memory allocated for Global Heap |
H5FD_MEM_LHEAP | File memory allocated for Local Heap |
H5FD_MEM_OHDR | File memory allocated for Object Header |
H5F_sect_info_t is defined as follows (in H5Fpublic.h):
This routine retrieves free-space section information for nsects
sections or, at most, the maximum number of sections in the specified free-space manager. If the number of sections is not known, a preliminary H5Fget_free_sections() call can be made by setting sect_info
to NULL and the total number of free-space sections for the specified free-space manager will be returned. Users can then allocate space for entries in sect_info
, each of which is defined as an H5F_sect_info_t struct
.
file_id
. sect_info
is non-null, but the parameter nsects
is equal to 0. Returns the amount of free space in a file (in bytes)
[in] | file_id | File identifier |
Given the identifier of an open file, file_id
, H5Fget_freespace() returns the amount of space that is unused by any objects in the file.
The interpretation of this number depends on the configured free space management strategy. For example, if the HDF5 library only tracks free space in a file from a file open or create until that file is closed, then this routine will report the free space that has been created during that interval.
herr_t H5Fget_info1 | ( | hid_t | obj_id, |
H5F_info1_t * | file_info | ||
) |
Retrieves global file information.
[in] | obj_id | Object identifier. The identifier may be that of a file, group, dataset, named datatype, or attribute. |
[out] | file_info | Buffer for global file information |
H5Fget_info1() returns global information for the file associated with the object identifier obj_id
in the H5F_info1_t struct
named file_info
.
obj_id
is an identifier for any object in the file of interest.
H5F_info1_t struct is defined in H5Fpublic.h as follows:
super_ext_size
is the size of the superblock extension.
The sohm
sub-struct contains shared object header message information as follows:
hdr_size
is the size of the shared object header message. msgs_info
is an H5_ih_info_t struct defined in H5public.h as follows: index_size
is the summed size of all the shared object header indexes. Each index might be either a B-tree or a list.herr_t H5Fget_info2 | ( | hid_t | obj_id, |
H5F_info2_t * | file_info | ||
) |
Retrieves global file information.
[in] | obj_id | Object identifier. The identifier may be that of a file, group, dataset, named datatype, or attribute. |
[out] | file_info | Buffer for global file information |
H5Fget_info2() returns global information for the file associated with the object identifier obj_id
in the H5F_info2_t struct
named file_info
.
obj_id
is an identifier for any object in the file of interest.
H5F_info2_t struct is defined in H5Fpublic.h as follows:
The super
sub-struct contains the following information:
vers
is the version number of the superblock. super_size
is the size of the superblock. super_ext_size
is the size of the superblock extension.The free
sub-struct contains the following information:
hdr_size
is the size of the free-space manager header. tot_space
is the total amount of free space in the file.The sohm
sub-struct contains shared object header message information as follows:
vers
is the version number of the shared object header information. hdr_size
is the size of the shared object header message. msgs_info
is an H5_ih_info_t struct defined in H5public.h as follows: index_size
is the summed size of all the shared object header indexes. Each index might be either a B-tree or a list. heap_size
is the size of the heap.Determines the read/write or read-only status of a file.
[in] | file_id | File identifier |
[out] | intent | Access mode flag as originally passed with H5Fopen() |
Given the identifier of an open file, file_id
, H5Fget_intent() retrieves the intended access mode" flag passed with H5Fopen() when the file was opened.
The value of the flag is returned in intent
. Valid values are as follows:
H5F_ACC_RDWR | File was opened with read/write access. |
H5F_ACC_RDONLY | File was opened with read-only access. |
H5F_ACC_SWMR_WRITE | File was opened with read/write access for a single-writer/multiple-reader (SWMR) scenario. Note that the writer process must also open the file with the H5F_ACC_RDWR flag. |
H5F_ACC_SWMR_READ | File was opened with read-only access for a single-writer/multiple-reader (SWMR) scenario. Note that the reader process must also open the file with the H5F_ACC_RDONLY flag. |
Retrieves name of file to which object belongs.
[in] | obj_id | Object identifier |
[out] | name | Buffer for the file name |
[in] | size | The size, in bytes, of the name buffer. Must be the size of the file name in bytes plus 1 for a NULL terminator |
H5Fget_name() retrieves the name of the file to which the object obj_id
belongs. The object can be a file, group, dataset, attribute, or named datatype.
Up to size
characters of the file name are returned in name
; additional characters, if any, are not returned to the user application.
Up to size
characters of the file name are returned in name
; additional characters, if any, are not returned to the user application.
If the length of the file name, which determines the required value of size
, is unknown, a preliminary call to H5Fget_name() with the last two parameters set to NULL and zero respectively can be made. The return value of this call will be the size in bytes of the file name. That value, plus 1 for a NULL terminator, must then be assigned to size
for a second H5Fget_name() call, which will retrieve the actual file name.
If an error occurs, the buffer pointed to by name
is unchanged and the function returns a negative value.
Returns the number of open object identifiers for an open file.
[in] | file_id | File identifier or H5F_OBJ_ALL for all currently-open HDF5 files |
[in] | types | Type of object for which identifiers are to be returned |
Given the identifier of an open file, file_id, and the desired object types, types, H5Fget_obj_count() returns the number of open object identifiers for the file.
To retrieve a count of open identifiers for open objects in all HDF5 application files that are currently open, as well as transient datatype objects that are not associated with any file, pass the value H5F_OBJ_ALL in file_id
.
The types of objects to be counted are specified in types as follows:
H5F_OBJ_FILE | Files only |
H5F_OBJ_DATASET | Datasets only |
H5F_OBJ_GROUP | Groups only |
H5F_OBJ_DATATYPE | Datatypes only. If file_id is H5F_OBJ_ALL, this will count committed and transient datatypes. Otherwise, it will only count committed datatypes. |
H5F_OBJ_ATTR | Attributes only |
H5F_OBJ_ALL | All of the above |
H5F_OBJ_LOCAL | Restrict search to objects opened through current file identifier. |
Multiple object types can be combined with the logical OR
operator (|). For example, the expression (H5F_OBJ_DATASET|H5F_OBJ_GROUP) would call for datasets and groups.
ssize_t
. Returns a list of open object identifiers.
[in] | file_id | File identifier or H5F_OBJ_ALL for all currently-open HDF5 files |
[in] | types | Type of object for which identifiers are to be returned |
[in] | max_objs | Maximum number of object identifiers to place into obj_id_list |
[out] | obj_id_list | Pointer to the returned buffer of open object identifiers |
obj_id_list
if successful; otherwise returns a negative value.Given the file identifier file_id
and the type of objects to be identified, types, H5Fget_obj_ids() returns the list of identifiers for all open HDF5 objects fitting the specified criteria.
To retrieve identifiers for open objects in all HDF5 application files that are currently open, pass the value H5F_OBJ_ALL in file_id
.
The types of object identifiers to be retrieved are specified in types using the codes listed for the same parameter in H5Fget_obj_count().
To retrieve a count of open objects, use the H5Fget_obj_count() function. This count can be used to set the max_objs
parameter.
ssize_t
and max_objs
parameter datatype changed to size_t
. ssize_t
and max_objs
parameter datatype changed to size_t
. herr_t H5Fget_page_buffering_stats | ( | hid_t | file_id, |
unsigned | accesses[2], | ||
unsigned | hits[2], | ||
unsigned | misses[2], | ||
unsigned | evictions[2], | ||
unsigned | bypasses[2] | ||
) |
Retrieves statistics about page access when it is enabled.
[in] | file_id | File identifier |
[out] | accesses | Two integer array for the number of metadata and raw data accesses to the page buffer |
[out] | hits | Two integer array for the number of metadata and raw data hits in the page buffer |
[out] | misses | Two integer array for the number of metadata and raw data misses in the page buffer |
[out] | evictions | Two integer array for the number of metadata and raw data evictions from the page buffer |
[out] | bypasses | Two integer array for the number of metadata and raw data accesses that bypass the page buffer |
H5Fget_page_buffering_stats() retrieves page buffering statistics such as the number of metadata and raw data accesses (accesses
), hits (hits
), misses (misses
), evictions (evictions
), and accesses that bypass the page buffer (bypasses
).
Returns pointer to the file handle from the virtual file driver.
[in] | file_id | File identifier |
[in] | fapl | File access property list identifier |
[out] | file_handle | Pointer to the file handle being used by the low-level virtual file driver |
Given the file identifier file_id
and the file access property list fapl_id
, H5Fget_vfd_handle() returns a pointer to the file handle from the low-level file driver currently being used by the HDF5 library for file I/O.
fapl_id
will be H5P_DEFAULT. For the FAMILY
or MULTI
drivers, this value should be defined through the property list functions: H5Pset_family_offset() for the FAMILY
driver and H5Pset_multi_type() for the MULTI
driverSets the file' EOA to the maximum of (EOA, EOF) + increment.
[in] | file_id | File identifier |
[in] | increment | The number of bytes to be added to the maximum of (EOA, EOF) |
H5Fincrement_filesize() sets the file's EOA to the maximum of (EOA, EOF) + increment
. The EOA is the end-of-file address stored in the file's superblock while EOF is the file's actual end-of-file.
Checks if a file can be opened with a given file access property list.
[in] | container_name | Name of a file |
[in] | fapl_id | File access property list identifier |
H5Fis_accessible() checks if the file specified by container_name
can be opened with the file access property list fapl_id
.
htri_t H5Fis_hdf5 | ( | const char * | file_name | ) |
Determines whether a file is in the HDF5 format.
[in] | file_name | File name |
H5Fis_hdf5() determines whether a file is in the HDF5 format.
Mounts an HDF5 file.
[in] | loc_id | Location identifier. The identifier may be that of a file or group. |
[in] | name | Name of the group onto which the file specified by child is to be mounted |
[in] | child | File identifier |
[in] | plist | File mount property list identifier. Pass H5P_DEFAULT! |
H5Fmount() mounts the file specified by child
onto the object specified by loc
and name
using the mount properties plist
If the object specified by loc
is a dataset, named datatype or attribute, then the file will be mounted at the location where the attribute, dataset, or named datatype is attached.
plist
is H5P_DEFAULT, indicating the default file mount property list.Opens an existing HDF5 file.
[in] | filename | Name of the file to be opened |
[in] | flags | File access flags. Allowable values are:
|
[in] | fapl_id | File access property list identifier |
H5Fopen() is the primary function for accessing existing HDF5 files. This function opens the named file in the specified access mode and with the specified access property list.
Note that H5Fopen() does not create a file if it does not already exist; see H5Fcreate().
The filename
parameter specifies the name of the file to be opened.
The fapl_id
parameter specifies the file access property list. The use of H5P_DEFAULT specifies that default I/O access properties are to be used.
The flags
parameter specifies whether the file will be opened in read-write or read-only mode, H5F_ACC_RDWR or H5F_ACC_RDONLY, respectively. More complex behaviors of file access are controlled through the file-access property list.
The return value is a file identifier for the open file; this file identifier should be closed by calling H5Fclose() when it is no longer needed.
Returns a new identifier for a previously-opened HDF5 file.
[in] | file_id | Identifier of a file for which an additional identifier is required |
H5Freopen() returns a new file identifier for an already-open HDF5 file, as specified by file_id
. Both identifiers share caches and other information. The only difference between the identifiers is that the new identifier is not mounted anywhere and no files are mounted on it.
The new file identifier should be closed by calling H5Fclose() when it is no longer needed.
file_id
. E.g., one cannot close a file with H5Fclose() on file_id
then use H5Freopen() on file_id
to reopen it.Resets the page buffer statistics.
[in] | file_id | File identifier |
H5Freset_page_buffering_stats() resets the page buffer statistics for a specified file identifier file_id
.
Sets the flag to create minimized dataset object headers.
[in] | file_id | File identifier |
[in] | minimize | Flag indicating whether the library will or will not create minimized dataset object headers |
H5Fset_dset_no_attrs_hint() sets the no dataset attributes hint setting for the file specified by the file identifier file_id
. If the boolean flag minimize
is set to true
, then the library will create minimized dataset object headers in the file. All files that refer to the same file-on-disk will be affected by the most recent setting, regardless of the file identifier/handle (e.g., as returned by H5Fopen()). By setting the minimize
flag to true
, the library expects that no attributes will be added to the dataset - attributes can be added, but they are appended with a continuation message, which can reduce performance.
true
, then the created dataset's object header will be minimized.Sets the latest version of the library to be used for writing objects.
[in] | file_id | File identifier |
[in] | latest_format | Latest format flag |
herr_t H5Fset_libver_bounds | ( | hid_t | file_id, |
H5F_libver_t | low, | ||
H5F_libver_t | high | ||
) |
Enables the switch of version bounds setting for a file.
[in] | file_id | File identifier |
[in] | low | The earliest version of the library that will be used for writing objects |
[in] | high | The latest version of the library that will be used for writing objects |
H5Fset_libver_bounds() enables the switch of version bounds setting for an open file associated with file_id
.
For the parameters low
and high
, see the description for H5Pset_libver_bounds().
Un-mounts an HDF5 file.
[in] | loc_id | Location identifier. The identifier may be that of a file or group. |
[in] | name | Name of the mount point |
Given a mount point, H5Funmount() dissociates the mount point's file from the file mounted there. This function does not close either file.
The mount point can be either the group in the parent or the root group of the mounted file (both groups have the same name). If the mount point was opened before the mount then it is the group in the parent; if it was opened after the mount then it is the root group of the child.