LUA Reference Guide
Search…
dir(directory)
Return an iterator listing all the files and directories name in a directory
@status current Introduced in 2.5.0
Parameters
  • directory (string) Working directory
Return value
none

Example

1
local var y = 40
2
for fname in dir("/SCRIPTS") do
3
lcd.drawText(5,y, fname, TEXT_COLOR)
4
y = y + 20
5
end
Copied!
Export as PDF
Copy link
Contents