Regular API function

simFileDialog / sim.fileDialog

Description Opens a dialog that allows selecting a file for save or load operations, or a folder. See also sim.msgBox.
C synopsis simChar* simFileDialog(simInt dlgType,const simChar* title,const simChar* startPath,const simChar* initName,const simChar* extName,const simChar* ext)
C parameters
dlgType: the file dialog type.
title: title of the dialog
startPath: the initial path. Indicate an empty string for the path to CoppeliaSim's application
initName: the initial name. Can be an empty string
extName: the extension name, e.g. "text file". Should be an empty string with dlgType=sim_filedlg_type_folder.
ext: the extension, e.g. "txt". Can contain several extensions, separated by semicolons, with dlgType=sim_filedlg_type_load or dlgType=sim_filedlg_type_load_multiple. Should be an empty string with dlgType=sim_filedlg_type_folder.
C return value
pointer to a string representing the selected file name and path, or folder name and path. In case several files were selected for a load operation, then they will be separated by a semicolon. The user is in charge of releasing the buffer with simReleaseBuffer.
Lua synopsis string pathAndName=sim.fileDialog(int mode,string title,string startPath,string initName,string extName,string ext)
Lua parameters
Similar to the C-function counterpart
Lua return values
Similar to the C-function counterpart