Skip to content

SelectFile

StackZ edited this page Jun 17, 2021 · 1 revision

Script function: SelectFile

UniversalEdit.SelectFile(Message, StartPath, LimitToStartPath, Extensions);

This function expects 4 parameters.

  • Message: The message to display.
  • StartPath: The path from where to start the filebrowser.
  • LimitToStartPath: If limiting the access of the filebrowser to StartPath and up only (true) or allowing access to the full SD Card (false).
  • Extensions: A table of extensions which to filter.

Example

-- The line below lets you select a LUA script starting at location `sdmc:/3ds/Universal-Edit/Hex-Editor/Scripts/` and restricted access to that location and up.
local File = UniversalEdit.SelectFile("Select a script.", "sdmc:/3ds/Universal-Edit/Hex-Editor/Scripts/", true, { "lua" });

-- This would return "" if cancelled.
Clone this wiki locally