Skip to main content

File

Displays a file picker row showing a file type icon, name and modification time. Tap to choose a new file. Typically used to select a data file whose path is consumed by a service script.

KeyTypeDescriptionRequiredDefaultMin Version
initialPathstringInitial top-level directoryXPP root
allowedExtensionsarray of stringAllowed file extensions[]
labelstringTitle shown when no file is selectedLocalizable""1.2-10
footerTextstringDescription shown when no file is selectedLocalizable""1.2-10
isFilebooleanPick file if true; pick directory if falsetrue1.2-10

Swipe left to reveal a delete button to clear the saved value.

initialPath is relative to the XPP bundle. If omitted, the current XPP path is used.

allowedExtensions filters the displayed items; non-matching extensions are hidden and cannot be selected.

Return TypeDescription
stringAbsolute path of the selected file

Theme

Theme KeyTypeDescription
labelColorColorFilename color
valueColorColorFile description color

Example

{
cell = "File";
key = "file1";
initialPath = "scripts";
isFile = true; -- Pick a file
label = "Please choose a script"; -- Title
-- footerText = "All script formats supported by XXT are allowed";
allowedExtensions = { "lua"; "xxt"; "xpp" }; -- Allowed extensions
};

XUI-File.png