It is great having the asset picker functionality while using the Codea editor but would also be helpful to be able to search for assets programmatically. For instance, if the programmer wanted to allow the user in real-time to open a file picker and choose an asset to load into Codea. Similarly, if the user wanted to save a file from inside a Codea project, the user could then open up a directory of files and ensure they don’t already have a file with the same name.
Currently, Codea allows:
dir = asset.documents.all
for key, value in ipairs(dir) do
to see the asset keys that one would use to read/write information to the Codea documents directory.
However, the ‘values’ from above are a combination of the assets’ keys and paths and are userdata and so cannot be parsed with lua’s string library. If there was a function that retrieved just the asset keys as strings from the documents directory then that would seem to make it easier to parse and allow programmers to allow users to choose to load certain aspects into Codea projects in real-time.