Get ipad writable directory in Flex

470
1
09-25-2012 02:27 PM
AnN
by
New Contributor
I am developing an ipad app using Flex (Adobe Air, Flash Builder). I understand that in objective-C, you can get the writable directory using NSDocumentDirectory, but how do you do the same in Flex??

In Flex, I use File.applicationStorageDirectory, and it works only when I run in the simulator. If I install the app on my ipad, it doesn't give any error, but I don't think it works. Please help!!
Tags (2)
0 Kudos
1 Reply
ParksCamp
New Contributor III
You should be able to use the File.applicationStorageDirectory to read/write files specific to your app (this space is only available to the app).  One caution is to make sure you are using the correct path.  The best way is to use resolvePath such as:
var newFile:File = File.applicationStorageDirectory.resolvePath("file.txt")
0 Kudos