FileManager Class
The FileManager class let you interact with files. It provides a function to load any file supported by PrestoPlot.
An event will be fired when PrestoPlot is trying to load a file, where you can take the responsibility to effectively load the data to make your own format reader.
Public Functions
exportData(filename, ...)
exportHTML(directory)
exportStats(filename, ...)
loadCommandFile(filename)
loadData(data)
loadDataFile(filename)
loadDataFromClipboard()
loadGraph(filename)
loadModel(filename)
loadProject(filename)
loadWorkspace(filename)
saveProject(filename)
updateLoadProgress(current, max)
Public Callbacks
onLoadDataFile(filename)
Detailed Functions Descriptions
exportData
exportData(filename, ...)
This function will export some datasets to a tabulated file.
Parameters :
-
filename: The full file name of the exported file. -
...: The datasets to export in the file.
exportHTML
exportHTML(directory)
This function will export an HTML report containing all the opened graph images and graph files.
Parameters :
directory: The directory where the report will be generated.
exportStats
exportStats(filename, ...)
This function will export statistics of some datasets to a tabulated file.
Parameters :
-
filename: The full file name of the exported file. -
...: The datasets to export in the file.
loadCommandFile
loadCommandFile(filename)
This function will load and process a command file.
Parameters :
filename: The full file name of the file to load.
loadData
loadData(data)
This function will load some CSV data.
Parameters :
data: The data to load. See CSV file format.
loadDataFile
loadDataFile(filename)
This function will load a data file, given its filename.
Parameters :
filename: The full file name of the file to load.
loadDataFromClipboard
loadDataFromClipboard()
This function will load some CSV data from the clipboard. See CSV file format.
loadGraph
loadGraph(filename)
This function will load a graph file.
Parameters :
filename: The full file name of the graph to load.
loadModel
loadModel(filename)
This function will load a model file.
Parameters :
filename: The full file name of the model to load.
loadProject
loadProject(filename)
This function will load a project file.
Parameters :
filename: The full file name of the project to load.
loadWorkspace
loadWorkspace(filename)
This function will load a workspace file.
Parameters :
filename: The full file name of the workspace to load.
saveProject
saveProject(filename)
This function will save the current environment into a project file.
Parameters :
filename: The full file name of the project file to save.
updateLoadProgress
updateLoadProgress(current, max)
This function can be called during an onLoadDataFile callback to indicate the loading progress. A dialog will be shown with a progress bar.
Parameters :
-
current: The current loading progress. It can be any integer value between 0 andmax. -
max: The maximum value the progress (currentparameter) can reach. It must be positive.
Detailed Callbacks Descriptions
onLoadDataFile
onLoadDataFile(filename)
This function will be called when a data file is being loaded. It can be used to implement a home made reader for a specific file format. You can implement here all the logic to read some specific file structure and inject data in new datasets.
You can also update the loading progess
Parameters :
filename: The file name to load.
Return : Your callback implementation must return true if you have processed the file and loaded data, or false if you are not interested in loading this file.