Tag: 波纹

是否可以使用Ripple模拟器testingPhoneGap File API

我正在使用PhoneGap(现在是Apache Cordova,版本为2.0)的应用程序,并使用PhoneGap File API写入文件。 我使用的File API可以参考: http : //docs.phonegap.com/en/2.0.0/cordova_file_file.md.html#File 我使用从这里的纹波模拟器(0.9.9beta): https : //developer.blackberry.com/html5/downloadtesting我的应用程序在铬。 但是我发现Ripple无法正确处理PhoneGap File API。 例如: 我想在PERSISTENT目录下创build一个文件(root / foo.json) 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); […]