Titanium Community Questions & Answer Archive

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

Titanium Desktop: All files in a directory

Hi folks,
i wonder if there's the possibility to get all filenames in a directory. I didn't found anything about that in the docs and would be happy if someone could point me in the right direction.

Julian

— asked September 10th 2010 by Ju Ho
  • desktop
  • directory
  • files
0 Comments

1 Answer

  • Accepted Answer

    you need to get the File object for the directory first (using getFile()) then you'd call getDirectoryListing():

    var dfo = Titanium.Filesystem.getFile(yourDir);
    var fid = dfo.getDirectoryListing();

    — answered September 10th 2010 by Kyle Quest
    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.