filesystem iphone not working = [undefined]
I copy the kitchensink example but it keeps giving me the same error:
Result of expression 'Titanium.Filesystem [undefined] is not an object. at …
The line is:
var f = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, 'text.txt');
4 Answers
-
if file exits Try with this:
var f = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory+ '/text.txt');
-
if file exits Try with this:
var f = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory+ '/text.txt');
-
i'm having the same problem. i write a file and run a script to check it but it thinks the file doesn't exist
-
you can't write in the resources directory try this:
var file = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, 'yourFile.txt');