require lua files from documentsDirectory?

Hey,

I just tried to write a small downloader for extensions.

So my code breaks at this line:

[lua]local path = system.pathForFile( “boom”, system.DocumentsDirectory )
local r=require(path)[/lua]

Is there a way to get this working?

cheers! [import]uid: 11772 topic_id: 8345 reply_id: 308345[/import]

i doubt it would work. lua files need to be in the app directory

but it should be [lua]system.pathForFile(“boom.lua”)[/lua] anyway

[import]uid: 6645 topic_id: 8345 reply_id: 29885[/import]

It would allow you to execute arbitrary, downloaded scripts after the app has been bundled-up, which is what Apple doesn’t allow and which is why Corona has disabled load-file/string in Lua to comply…

It would be cool though if it would work… :wink:

-FrankS.
[import]uid: 8093 topic_id: 8345 reply_id: 29948[/import]

Yeah that was what I thought too. Thanks for the replies! [import]uid: 11772 topic_id: 8345 reply_id: 29963[/import]