Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Highlighted
Regular Contributor
Posts: 65
Registered: ‎01-03-2013
My Device: 9810
My Carrier: Tmobile

phonegap FileReader is not working

i want to access the file system and creat new folder using phonegap FileReader function which is for all typd of platforms it works fine for iOS but fails in Blackberry can any one help please

 

  function initFileSystem(completionCallback) {
    log("DEBUG:  Initialising file system");

    // Kick off request
    window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
    window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, // <-- What is this 0 for?
    // FS load Success
    function(fileSystem) {
      log("DEBUG:  Mounted file system, root is: " + fileSystem.root.fullPath);

      // save the file system for later access
      APP.fileSystem = fileSystem.root;

      // Make sure we have a dowbnloadable directory for our assets when they arrive
      APP.fileSystem.getDirectory("downloadable", {
        create : true,
        exclusive : false
      }, function(parent) {
        log("DEBUG:  Found/created a downloadable directory");
      }, function(error) {
        log("FATAL:  Failed to find/create downloadable directory");
      });

      // Let main application continue init
      completionCallback();
    },
    // FS load failure
    function() {
      log("FATAL:  Unable to mount file system!");
      // TODO Should be an alert to the user in here.
    });
  }

 

 Thak you 

-----
Please press the like button to thank the user that helped you.
Accept as a solution if it solved the problem.
Cheers