Skip to main content
Definition: LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1209) Object for assisting in save and restoring files.

Members

Public functions

Function saveFile

Save a file into the context. If the save is successful passing the context to restore as the file ID will return the saved file. Parameters:
  • sourceLocation: the location of the source file to save
  • context: context by which to save
Returns: true if the file was saved successfully; false otherwise Parameters:
  • BSTR sourceLocation
  • BSTR context
Return type: boolean

Function restoreFile

Restores the file by ID to the given location. Parameters:
  • fileID: id of the file to restore
  • targetLocation: disk location to restore the file
Returns: true if a file with the given id was restored, false on failure Parameters:
  • BSTR fileID
  • BSTR targetLocation
Return type: boolean

Function close

Closes the save context. Return type: void

Function getSaveLocation

Gets the disk location this save context saves. Returns: the save context file path Return type: BSTR

Function saveFileStream

Gets a stream that can be used for saving a file to the context. Only one stream may be open at a time. Parameters:
  • context: context by which to save
Returns: output stream for saving Parameters:
  • BSTR context
Return type: LPUNKNOWN

Function restoreFileStream

Gets a stream that can be used for restoring a file saved into the context with the given ID. Only one stream may be open at a time. Parameters:
  • fileID: id of the file to restore
Returns: input stream for restoring Parameters:
  • BSTR fileID
Return type: LPUNKNOWN

Function getFileFormat

Get the file format of the save context instance. Returns: save context file format Return type: int

Function setFileFormat

Set the file format of the save context. Parameters:
  • fileFormat: file format of save context instance
Parameters:
  • int fileFormat
Return type: void