File I/O GUI Options

Review OML functions for interacting with input and output.

OML offers functions dedicated to interacting with the input and output of files when creating GUIs. These files include: uigetfile, uiputfile and uigetdir.


uigetfile opens the file selection dialog box for selecting a file. The dialog box lists the files and folders in the current folder.

[name,filepath,index] = uigetfile({'*.txt;*.dat','Text files';'*.oml','Compose files'},'Open My File');


uiputfile displays a file selection dialog box, returning the selected or specified file path to path.

name = uiputfile('*.oml','Save My File','test.oml');


uigetdir opens a folder selection dialog box. If no path is specified, the current working directory is used.

name = uigetdir('C:/software','Select Directory');