gui.showExternalFileChooserDialog

Opens an OS-native file chooser dialogue for import/export.

Prototype

  1. {sPath} = gui.showExternalFileChooserDialog ( sTitle, sDirectory, sFilter, kFileChooserDialogOption )

Description

Check the predefined kFileChooserDialogOption constants to switch between the different dialogue types.


Parameters

sTitle - window title
sDirectory - directory string
sFilter - filter string
kFileChooserDialogOption - predefined option constant


Return values

{sPath} - Lua table of full path file name strings


Sample

  1. local tFilesToExport = gui.showExternalFileChooserDialog ( "Export module...", sModuleIdentifier..".ste", "STE files (*.ste)", gui.kFileChooserDialogOptionSaveFile )
  2. if ( tFilesToExport and ( #tFilesToExport == 1 ) ) then
  3. -- do stuff

Available since ShiVa 2.0