resqpy.olio.write_hdf5.copy_h5¶
- resqpy.olio.write_hdf5.copy_h5(file_in, file_out, uuid_inclusion_list=None, uuid_exclusion_list=None, mode='w')[source]¶
Create a copy of an hdf5, optionally including or excluding arrays with specified uuids.
- Parameters
file_in (string) – path of existing hdf5 file to be duplicated
file_out (string) – path of output hdf5 file to be created or appended to (see mode)
uuid_inclusion_list (list of uuid.UUID, optional) – if present, the uuids to be included in the output file
uuid_exclusion_list (list of uuid.UUID, optional) – if present, the uuids to be excluded from the output file
mode (string, default 'w') – mode to open output file with; must be ‘w’ or ‘a’ for (over)write or append respectively
- Returns
number of hdf5 groups (uuid’s) copied
Notes
at most one of uuid_inclusion_list and uuid_exclusion_list should be passed; if neither are passed, all the datasets (arrays) in the input file are copied to the output file