Can it test the PhoneGap file API with the Ripple emulator?

I am working on an application with PhoneGap (now Apache Cordova with version 2.0) and using the FileGap File API to write a file.

In the File API, you can link to: http://docs.phonegap.com/en/2.0.0/cordova_file_file.md.html#File

I am using Ripple Emulator (0.9.9beta) from here: https://developer.blackberry.com/html5/download to test my application on chrome.

But I believe that Ripple cannot properly handle PhoneGap file APIs.

For instance:

I want to create a file (root / foo.json) in the PERSISTENT directory

function onSuccess(fileSystem) {
    fileSystem.root.getDirectory("dir", {create: true}, function(dirEntry){
        dirEntry.getFile("foo.json", {create: true}, function(fileEntry){       
            fileEntry.createWriter(function(writer){
                writer.write(JSON.stringify(fooData));
            }, onfail);
        }, onfail);
    }, onfail);
}
function onfail(error)
{
    console.log(error.code);
}

// request the persistent file system
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onSuccess, onfail);

iOS-, , Ripple Emulator, , onfail 10 (FileError.QUOTA_EXCEEDED_ERR).

- : ?

.

Ripple API PhoneGap? ?

+5
1

. PERSISTENT. https://developers.google.com/chrome/whitepapers/storage#persistent

// Request Quota (only for File System API)

window.webkitStorageInfo.requestQuota(PERSISTENT, 1024*1024, function(grantedBytes) {
window.webkitRequestFileSystem(PERSISTENT, grantedBytes, onInitFs, errorHandler); 
}, function(e) {
console.log('Error', e); 
});

, Ripple-UI ( lib/ripple/fs.js). FileError.QUOTA_EXCEEDED_ERR.

+3

All Articles