1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 * Copyright by The HDF Group. *
3 * Copyright by the Board of Trustees of the University of Illinois. *
4 * All rights reserved. *
6 * This file is part of HDF5. The full HDF5 copyright notice, including *
7 * terms governing use, modification, and redistribution, is contained in *
8 * the COPYING file, which can be found at the root of the source code *
9 * distribution tree, or in https://www.hdfgroup.org/licenses. *
10 * If you do not have access to either file, you may request a copy from *
11 * help@hdfgroup.org. *
12 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 * Programmer: Robb Matzke
16 * Monday, August 2, 1999
18 * Purpose: The public header file for the core driver.
23 #define H5FD_CORE (H5FD_core_init())
28 H5_DLL hid_t H5FD_core_init(void);
33 * \brief Modifies the file access property list to use the #H5FD_CORE driver
36 * \param[in] increment Size, in bytes, of memory increments
37 * \param[in] backing_store Boolean flag indicating whether to write the file
38 * contents to disk when the file is closed
41 * \details H5Pset_fapl_core() modifies the file access property list to use the
44 * The #H5FD_CORE driver enables an application to work with a file in
45 * memory, speeding reads and writes as no disk access is made. File
46 * contents are stored only in memory until the file is closed. The \p
47 * backing_store parameter determines whether file contents are ever
50 * \p increment specifies the increment by which allocated memory is to
51 * be increased each time more memory is required.
53 * While using H5Fcreate() to create a core file, if the \p
54 * backing_store is set to 1 (TRUE), the file contents are flushed to a
55 * file with the same name as this core file when the file is closed or
56 * access to the file is terminated in memory.
58 * The application is allowed to open an existing file with #H5FD_CORE
59 * driver. While using H5Fopen() to open an existing file, if the \p
60 * backing_store is set to 1 (TRUE) and the \c flags for H5Fopen() is set to
61 * #H5F_ACC_RDWR, any change to the file contents are saved to the file
62 * when the file is closed. If \p backing_store is set to 0 (FALSE) and the \c
63 * flags for H5Fopen() is set to #H5F_ACC_RDWR, any change to the file
64 * contents will be lost when the file is closed. If the flags for
65 * H5Fopen() is set to #H5F_ACC_RDONLY, no change to the file is
66 * allowed either in memory or on file.
68 * \note Currently this driver cannot create or open family or multi files.
73 H5_DLL herr_t H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store);
78 * \brief Queries core file driver properties
81 * \param[out] increment Size, in bytes, of memory increments
82 * \param[out] backing_store Boolean flag indicating whether to write the file
83 * contents to disk when the file is closed
86 * \details H5Pget_fapl_core() queries the #H5FD_CORE driver properties as set
87 * by H5Pset_fapl_core().
92 H5_DLL herr_t H5Pget_fapl_core(hid_t fapl_id, size_t *increment /*out*/, hbool_t *backing_store /*out*/);