Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-6428

Unable to read android_asset directory through File API

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3.0
    • None
    • cordova-plugin-file
    • Android 4.4.2 / Samsung Galaxy S4

    Description

      Attempting to read the 'android_asset' folder through the File API results in Error Code 5 (FileError.ENCODING_ERR). I've tried accessing via resolveLocalFileSystemURL, and by creating a directory reader and calling readEntries().

      window.resolveLocalFileSystemURL('file:///android_asset/www/my_asset_folder', success, fail);

      var sourceDir = new DirectoryEntry(

      { fullPath: 'file:///android_asset/www/my_asset_folder' }

      );
      var reader = sourceDir.createReader();
      reader.readEntries(success, fail);

      (I have also tried with the URLs being '/android_asset/www/my_asset_folder'; same result)

      Attachments

        Issue Links

          Activity

            People

              agrieve Andrew Grieve
              mattgrande Matt Grande
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: