filefinder — File selection widget.


filefinder [-startdir start_directory] [-selectedcmd selected_command] [-matchcmd match_command] [-errorcmd error_command]


Creates a lcdui.list based file selection dialog that lets the user navigate up and down through directories and select a file. The options are as follows:

  • -startdir: selects the directory to start the search in.

  • -selectedcmd: a proc that by default takes one argument: the name of the selected file.

  • -matchcmd: a proc that takes one argument: the full URL of the file to match against. If the file is a match, the proc must return a 1, otherwise 0. If a match occurs, the -selectedcmd will subsequently be called.

  • -errorcmd: a proc that is called with one argument: an error message. This is called when some error occurs and can be used to display an error message.