DocumentDirectory vs ResourceDirectory

I see that there are two directories (that I’ve found so far), that we can access - the resource directory and the document directory.

I’m using Outlaw for my project and I can see that the default directory - when I copy my image - or other file - into the Outlaw project, it seems to go into the resource directory.

Is there a way to specify files to go into the document directory?

How do I access the document directory from Outlaw?

Thanks!

http://docs.coronalabs.com/api/library/system/DocumentsDirectory.html

Thanks for the link, but that doesn’t really answers my questions.

Is there anyway to put files into the documents directory during development?

You can access the document directory from the Corona Simulator. File…Show Project Sandbox. 

But it doesn’t look like I can add files to it at development time.  From what I gather it looks like it’s more for storing files generated by the app itself… such highscores, preferences, etc.

Is that correct?

For instance, I could load a bunch of HTML files or IMAGES in the documents directory.  I would need to keep them in the resources directory.

Hi John,

Yes, for files you want to include during build, they should be in the Resource directory. The Documents directory is for items you want to store in the app’s “sandbox” later. Now, you could technically copy those files from Resource over to Documents during Runtime, but then you’ll just have multiple copies of them, without much benefit in having those copies, so it probably isn’t sensible to do so in most cases.

Take care,

Brent

Thanks Brent.  That makes sense.  I appreciate the help.

http://docs.coronalabs.com/api/library/system/DocumentsDirectory.html

Thanks for the link, but that doesn’t really answers my questions.

Is there anyway to put files into the documents directory during development?

You can access the document directory from the Corona Simulator. File…Show Project Sandbox. 

But it doesn’t look like I can add files to it at development time.  From what I gather it looks like it’s more for storing files generated by the app itself… such highscores, preferences, etc.

Is that correct?

For instance, I could load a bunch of HTML files or IMAGES in the documents directory.  I would need to keep them in the resources directory.

Hi John,

Yes, for files you want to include during build, they should be in the Resource directory. The Documents directory is for items you want to store in the app’s “sandbox” later. Now, you could technically copy those files from Resource over to Documents during Runtime, but then you’ll just have multiple copies of them, without much benefit in having those copies, so it probably isn’t sensible to do so in most cases.

Take care,

Brent

Thanks Brent.  That makes sense.  I appreciate the help.