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

Android: cannot list files on lib directory with Filesystem.getFiles - getDirectoryListing

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: Release 5.1.1
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      Android 5.0.2
      SDK 5.1.1.GA
      Samsung Galaxy Tab S2

    • Story Points:
      5
    • Sprint:
      2018 Sprint 12 SDK

      Description

      Under lib directory I created a "repositories" dir, and under this dir I put some kind of commonjs modules I would like to load dinamically.
      On iOS I do this and it works:
      requirePath = "repositories/";
      repositoriesDir = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory + requirePath);
      repositoriesFiles = repositoriesDir.getDirectoryListing();
      // requires and other operations with those files

      On Android apparently I cannot read files contained inside that directory.
      I've found one guy with the same problem on your old forum, but now it's closed and there isn't an answer:
      https://developer.appcelerator.com/question/179048/where-are-my-alloy-lib-files-in-the-filesystem-on-android

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                pic Mauro Piccotti
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-20845
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code