I am working on an iPad app using appcelarator titanium and need to iterate over the content of a directory and determine the type of the contained items, whether it is a file or directory. This is what I have so far: dirFullPath = '/full/path/to/directory'; var dir = Titanium.Filesystem.getFile(dirFullPath); var dirItems = dir.getDirectoryListing(); for ( var i=0; i<dir.length; i++ ) { itemFullPa