I’m struggling with exactly this scenario too.
I have a few solutions, but nothing as neat as direct reading from within the app.
Corona apps cannot ‘interrogate’ a folder to see whats there.
You can guess a filename and check if it exists by trying to open it.
What you are asking for is a ‘pull’ method.
If you are interested, there is already a ‘push’ method.
If you include
UIFileSharingEnabled = true
in your build settings , then when the user plugs in the iPhone or iPad and synchs, they will be able to select your app in iTunes, and they will see the contents of the system.documents folder
(Right at the bottom of the screen… if you don’t have an enormous monitor you could be forgiven for never seeing this option)
So they can drag files in, and drag files out.
Its clumsy, and I would rather Apple had implemented this folder like a mounted drive on the desktop, but its better than nothing.
You can also ‘pull’ from a web site.
(My current gripe about that is that even if there is no file, I get a file created by trying to download one.
Its full of error 404 message: I would have expected a trappable network error 404, but I dont get that: presumably because the server is being ‘kind’ and delivering some content, even if it is no use to me.
) [import]uid: 108660 topic_id: 20629 reply_id: 81011[/import]