Class FPMIFileUtilities
java.lang.Object
com.inductiveautomation.ignition.client.script.ClientFileUtilities
com.inductiveautomation.factorypmi.application.script.builtin.FPMIFileUtilities
These are the file utilities that have a GUI element.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.client.script.ClientFileUtilities
ClientFileUtilities.BinaryFileWritingTask, ClientFileUtilities.CharFileWritingTask, ClientFileUtilities.FileWritingTask, ClientFileUtilities.FileWritingTaskFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionopenFile()Shows the open file dialog box with no file extension restrictions.static StringShows the open file dialog box with a file extension filter for the given extension.static StringShows the open file dialog box with a file extension filter for the given extension.Shows the open file dialog box with a file extension filter for the given extension.Shows the open file dialog box with a file extension filter for the given extension, at the given location.String[]Shows the open file dialog box, allows multiple files to be selected.static String[]Shows the open file dialog box with a file extension filter for the given extension, at the given location.String[]Shows the open file dialog box with a file extension filter for the given extension.String[]Shows the open file dialog box with a file extension filter for the given extension, at the given location.Asks the user to save a file with the namefilenameReturns the chosen file's path if the user hits OKOpens a save as dialog box, and returns the path to the selected file, or None if the dialog was canceledstatic StringsaveToFile(Component parent, String filename, String extension, 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.ClientFileUtilities
getChooser
-
Constructor Details
-
FPMIFileUtilities
-
-
Method Details
-
saveFile
Asks the user to save a file with the namefilenameReturns the chosen file's path if the user hits OK -
saveFile
Opens a save as dialog box, and returns the path to the selected file, or None if the dialog was canceled -
saveToFile
public static String saveToFile(Component parent, String filename, String extension, 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.
-
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.
-
openFile
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.
-
openFile
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.
-
openFile
Shows the open file dialog box with a file extension filter for the given extension.- Parameters:
parent- The parent component of the dialog boxextension- a filename extension, like "pdf", without the prepending period.- Returns:
- A string representing the path to the selected file, or None if cancelled.
-
openFile
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.
-
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.
-
openFiles
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.
-
openFiles
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.
-
openFiles
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 boxextension- 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.
-