Class FPMIFileUtilities
- java.lang.Object
- 
- com.inductiveautomation.ignition.client.script.ClientFileUtilities
- 
- com.inductiveautomation.factorypmi.application.script.builtin.FPMIFileUtilities
 
 
- 
 public class FPMIFileUtilities extends ClientFileUtilities These are the file utilities that have a GUI element.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.client.script.ClientFileUtilitiesClientFileUtilities.BinaryFileWritingTask, ClientFileUtilities.CharFileWritingTask, ClientFileUtilities.FileWritingTask, ClientFileUtilities.FileWritingTaskFactory
 
- 
 - 
Constructor SummaryConstructors Constructor Description FPMIFileUtilities(java.awt.Component parent)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringopenFile()Shows the open file dialog box with no file extension restrictions.static java.lang.StringopenFile(java.awt.Component parent, java.lang.String extension)Shows the open file dialog box with a file extension filter for the given extension.static java.lang.StringopenFile(java.awt.Component parent, java.lang.String extension, java.lang.String defaultLocation)Shows the open file dialog box with a file extension filter for the given extension.java.lang.StringopenFile(java.lang.String extension)Shows the open file dialog box with a file extension filter for the given extension.java.lang.StringopenFile(java.lang.String extension, java.lang.String defaultLocation)Shows the open file dialog box with a file extension filter for the given extension, at the given location.java.lang.String[]openFiles()Shows the open file dialog box, allows multiple files to be selected.static java.lang.String[]openFiles(java.awt.Component parent, java.lang.String extension, java.lang.String defaultLocation)Shows the open file dialog box with a file extension filter for the given extension, at the given location.java.lang.String[]openFiles(java.lang.String extension)Shows the open file dialog box with a file extension filter for the given extension.java.lang.String[]openFiles(java.lang.String extension, java.lang.String defaultLocation)Shows the open file dialog box with a file extension filter for the given extension, at the given location.java.lang.StringsaveFile(java.lang.String filename)Asks the user to save a file with the namefilenameReturns the chosen file's path if the user hits OKjava.lang.StringsaveFile(java.lang.String filename, java.lang.String extension, java.lang.String fileTypeDescription)Opens a save as dialog box, and returns the path to the selected file, or None if the dialog was canceledstatic java.lang.StringsaveToFile(java.awt.Component parent, java.lang.String filename, java.lang.String extension, java.lang.String fileTypeDescription, ClientFileUtilities.FileWritingTask writer)Show a save as dialog box with the givenfilenameas a suggestion.- 
Methods inherited from class com.inductiveautomation.ignition.client.script.ClientFileUtilitiesgetChooser
 
- 
 
- 
- 
- 
Method Detail- 
saveFilepublic java.lang.String saveFile(java.lang.String filename) Asks the user to save a file with the namefilenameReturns the chosen file's path if the user hits OK
 - 
saveFilepublic java.lang.String saveFile(java.lang.String filename, java.lang.String extension, java.lang.String fileTypeDescription)Opens a save as dialog box, and returns the path to the selected file, or None if the dialog was canceled
 - 
saveToFilepublic static java.lang.String saveToFile(java.awt.Component parent, java.lang.String filename, java.lang.String extension, java.lang.String fileTypeDescription, ClientFileUtilities.FileWritingTask writer)Show a save as dialog box with the givenfilenameas a suggestion. If save is selected, the FileWritingTask will be invoked to write to the file- Returns:
- The path to the saved file, or null if the action failed or was canceled.
 
 - 
openFilepublic java.lang.String openFile() Shows the open file dialog box with no file extension restrictions.- Returns:
- A string representing the path to the selected file, or None if cancelled.
 
 - 
openFilepublic java.lang.String openFile(java.lang.String extension) Shows the open file dialog box with a file extension filter for the given extension.- Parameters:
- extension- a filename extension, like "pdf", without the prepending period.
- Returns:
- A string representing the path to the selected file, or None if cancelled.
 
 - 
openFilepublic java.lang.String openFile(java.lang.String extension, java.lang.String defaultLocation)Shows the open file dialog box with a file extension filter for the given extension, at the given location.- Parameters:
- extension- a filename extension, like "pdf", without the prepending period.
- defaultLocation- the default folder location to open with the file chooser.
- Returns:
- A string representing the path to the selected file, or None if cancelled.
 
 - 
openFilepublic static java.lang.String openFile(java.awt.Component parent, java.lang.String extension)Shows the open file dialog box with a file extension filter for the given extension.- Parameters:
- parent- The parent component of the dialog box
- extension- a filename extension, like "pdf", without the prepending period.
- Returns:
- A string representing the path to the selected file, or None if cancelled.
 
 - 
openFilepublic static java.lang.String openFile(java.awt.Component parent, java.lang.String extension, java.lang.String defaultLocation)Shows the open file dialog box with a file extension filter for the given extension.- Parameters:
- extension- a filename extension, like "pdf", without the prepending period.
- defaultLocation- the full path to a default location to open the dialog with.
- Returns:
- A string representing the path(s) to the selected file(s), or None if cancelled.
 
 - 
openFilespublic java.lang.String[] openFiles() Shows the open file dialog box, allows multiple files to be selected.- Returns:
- A list of the the path(s) to the selected file(s), or None if cancelled.
 
 - 
openFilespublic java.lang.String[] openFiles(java.lang.String extension) Shows the open file dialog box with a file extension filter for the given extension. Allows multiple files to be selected.- Parameters:
- extension- a filename extension, like "pdf", without the prepending period.
- Returns:
- A list of the the path(s) to the selected file(s), or None if cancelled.
 
 - 
openFilespublic java.lang.String[] openFiles(java.lang.String extension, java.lang.String defaultLocation)Shows the open file dialog box with a file extension filter for the given extension, at the given location. Allows multiple files to be selected.- Parameters:
- extension- a filename extension, like "pdf", without the prepending period.
- defaultLocation- the default folder location to open with the file chooser.
- Returns:
- A list of the the path(s) to the selected file(s), or None if cancelled.
 
 - 
openFilespublic static java.lang.String[] openFiles(java.awt.Component parent, java.lang.String extension, java.lang.String defaultLocation)Shows the open file dialog box with a file extension filter for the given extension, at the given location. Allows multiple files to be selected.- Parameters:
- parent- The parent component of the dialog box
- extension- a filename extension, like "pdf", without the prepending period.
- defaultLocation- the default folder location to open with the file chooser.
- Returns:
- A list of the the path(s) to the selected file(s), or None if cancelled.
 
 
- 
 
-