The low-level function for opening a connection to an HDF5 file is H5Fopen() and is defined in the rhdf5 package. By default, it opens a read/write connection but you can change this by specifying "H5F_ACC_RDONLY" via the flags argument:
The man page for rhdf5::H5Fopen doesn't provide much details but the corresponding C function in the HDF5 C library is documented here and provides more details.
Note that HDF5Array objects, and on-disk DelayedArray objects in general, provide a read-only semantic i.e. they never touch the files/datasets they are pointing at. Furthermore, they are not "connected" to these files in the sense that they don't store open connections to them. Instead they open a new connection each time they need to read data from disk (there are good reasons for choosing this approach). They do this by calling rhdf5::h5read() or HDF5Array::h5mread() which take care of opening/closing the connection each time they are called.
The low-level function for opening a connection to an HDF5 file is
H5Fopen()
and is defined in the rhdf5 package. By default, it opens a read/write connection but you can change this by specifying"H5F_ACC_RDONLY"
via theflags
argument:The man page for
rhdf5::H5Fopen
doesn't provide much details but the corresponding C function in the HDF5 C library is documented here and provides more details.Note that HDF5Array objects, and on-disk DelayedArray objects in general, provide a read-only semantic i.e. they never touch the files/datasets they are pointing at. Furthermore, they are not "connected" to these files in the sense that they don't store open connections to them. Instead they open a new connection each time they need to read data from disk (there are good reasons for choosing this approach). They do this by calling
rhdf5::h5read()
orHDF5Array::h5mread()
which take care of opening/closing the connection each time they are called.