Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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');

— asked August 19th 2010 by jordi martinez
  • filesystem
  • iphone
  • undefined
0 Comments

4 Answers

  • if file exits Try with this:

    var f = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory+ '/text.txt');

    — answered August 27th 2010 by Varun Atluri
    permalink
    0 Comments
  • if file exits Try with this:

    var f = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory+ '/text.txt');

    — answered August 27th 2010 by Varun Atluri
    permalink
    0 Comments
  • 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

    — answered May 26th 2011 by Gavy Aggarwal
    permalink
    0 Comments
  • you can't write in the resources directory try this:

    var file = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, 'yourFile.txt');
    
    — answered June 12th 2011 by Eni Sinanaj
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.