Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-13444

TiAPI: getDirectoryListing used with compiled js files

    Details

    • Type: New Feature
    • Status: Reopened
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
    • Environment:

      titanium 3.1.0 master
      ios sdk 6.0
      device/simulator

      Description

      using the code above you can test a difference in behavior in dev and production.
      given the assets in attachment (unzip in your ressources dir), in development you will get a list of js files in the console.
      In production you will get an empty list.

      This is normal as the js are compiled and not really there. My question is could we get a behavior as with Titanium.Filesystem.File.exists which works on compiled js files (as shown is KitchenSink).

      Thanks

      var dir = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, 'toto');
      var dir_files = dir.getDirectoryListing();
      if (!dir_files || dir_files === null || dir_files.length === 0){
      	Ti.API.info('no files to list in ' + dir.nativePath );
      }
      else{
      	for (var i = 0; i < dir_files.length; i++) {
      		Ti.API.info('found file ' + dir_files[i] );
      	}
      }
      
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              farfromrefuge Martin Guillon (Inactive)
            • Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration