class_docstr: The workspace contains the processing information and state for
  a pipeline run on an image set
class_docstr_tok: ["The","workspace","contains","the","processing","information","and","state","for","a","pipeline","run","on","an","image","set"]
docstr: Save the current workspace to the given path
  
  path - path to file to save
  
  Note: "saving" means copying the temporary workspace file
code: def save(self, path):
      """Save the current workspace to the given path
  
      path - path to file to save
  
      Note: "saving" means copying the temporary workspace file
      """
      self.save_default_folders_to_measurements()
      self.measurements.flush()
      #
      # Note: shutil.copy and similar don't seem to work under Windows.
      #       I suspect that there's some file mapping magic that's
      #       causing problems because I found some internet postings
      #       where people tried to copy database files and failed.
      #       If you're thinking, "He didn't close the file", I did.
      #       shutil.copy creates a truncated file if you use it.
      #
      hdf5src = self.measurements.hdf5_dict.hdf5_file
      hdf5dest = h5py.File(path, mode="w")
      for key in hdf5src:
          obj = hdf5src[key]
          if isinstance(obj, h5py.Dataset):
              hdf5dest[key] = obj[()]
          else:
              hdf5src.copy(hdf5src[key], hdf5dest, key)
      for key in hdf5src.attrs:
          hdf5dest.attrs[key] = hdf5src.attrs[key]
      hdf5dest.close()
  
imports: import io
  import logging
  import os
  import h5py
  import cellprofiler_core.utilities.measurement
  from ._disposition_changed_event import DispositionChangedEvent
  from ..constants.measurement import EXPERIMENT
  from ..constants.workspace import DISPOSITION_CONTINUE
  from ..utilities.hdf5_dict import HDF5FileList
label_desc: Use image node_id 37 for calling the Workspace obj's underlying member method code with example usage: obj.save(path) without return types