flashairは知りませんので、軽くググった程度で話をしますが…。
まず、「flashair lua」でググると、以下のページが見つかりました。
(おそらく、公式の開発者用サイト?)
FlashAirのLua機能は、いくつかの制限もあります。 利用できるライブラリの制限事項については、 Lua APIガイドをご覧ください。
と書かれていて、その「Lua APIガイド」を見ると、「利用できる機能」に「LuaFileSystem」という物があります。
まさしくそれっぽい名前ですね。
更に、その公式サイトから「マニュアル」のページを見ると、
iter, dir_obj = lfs.dir (path)
Lua iterator over the entries of a given directory. Each time the iterator is called with dir_obj it returns a directory entry's name as a string, or nil if there are no more entries. You can also iterate by calling dir_obj:next(), and explicitly close the directory before the iteration finished with dir_obj:close(). Raises an error if path is not a directory.
という、それっぽいメソッドがありました。
更に、「lua lfs.dir」でググると、以下のページが引っかかりました。
これだけ出てくれば、試す材料は揃ったのではないでしょうか。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。