Skip to contents

Close connections or release resources associated with an object. This generic is used for objects that manage external resources like HDF5 file handles.

This method manually closes the HDF5 file handle stored within the H5NeuroVec object. It uses the close_h5_safely helper.

This method manually closes the HDF5 file handle stored within the H5NeuroVol object. It uses the safe_h5_close helper.

This method manually closes the HDF5 file handle stored within the LabeledVolumeSet object. It uses the close_h5_safely helper to ensure the handle is valid before attempting to close.

Usage

close(con, ...)

# S4 method for class 'H5ParcellatedMultiScan'
close(con, ...)

# S4 method for class 'H5ParcellatedScanSummary'
close(con, ...)

# S4 method for class 'H5ParcellatedScan'
close(con, ...)

# S4 method for class 'H5NeuroVec'
close(con, ...)

# S4 method for class 'H5NeuroVecSeq'
close(con, ...)

# S4 method for class 'H5NeuroVol'
close(con, ...)

# S4 method for class 'LabeledVolumeSet'
close(con, ...)

Arguments

con

A LabeledVolumeSet object.

...

Additional arguments (ignored).

Value

Usually returns NULL invisibly

NULL invisibly

Invisibly returns NULL.

Invisibly returns NULL.

Invisibly returns NULL.

Examples

if (FALSE) { # \dontrun{
# Example with LabeledVolumeSet
if (!is.null(fmristore:::create_minimal_h5_for_LabeledVolumeSet)) {
  temp_file <- fmristore:::create_minimal_h5_for_LabeledVolumeSet()
  lvs <- read_labeled_vec(temp_file)
  # Use the object...
  close(lvs) # Close the HDF5 file handle
  unlink(temp_file)
}
} # }