bdIsLocked_hdf5

HDF5_IO_MANAGEMENT

1 Description

Uses HDF5 file locking to check if filename can be opened in read/write mode. If opening fails under locking, the file is treated as “in use” and TRUE is returned. Non-existent files return FALSE.

2 Usage

bdIsLocked_hdf5(filename)

3 Arguments

Parameter Description
filename Character. Path to the HDF5 file.

4 Value

Logical scalar: if locked/in use, otherwise.

5 Details

Requires HDF5 file locking (HDF5 >= 1.12 recommended). The function sets HDF5_USE_FILE_LOCKING=TRUE for the process.

6 Examples

Code
if (bdIsFileLocked("data.h5")) stop("File in use")