科尔多瓦resolveLocalFileSystemURL回调没有被解雇 [英] Cordova resolveLocalFileSystemURL callbacks not fired

查看:273
本文介绍了科尔多瓦resolveLocalFileSystemURL回调没有被解雇的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图运行以下code,但回调[确定()和高()不叫。结果
使用工作灯6.2(3.4科尔多瓦)。

I've been trying to run the following code but the callbacks [ok() and ko()] are not called.
Using Worklight 6.2 (Cordova 3.4).

function wlCommonInit() {
    window.requestFileSystem(LocalFileSystem.PERSISTENT, 0,
            success, fail);

    window.resolveLocalFileSystemURL(cordova.file.applicationDirectory
            + "www/index.html", ok, ko);
}

function ko(e) {
    alert("NO");
}

function ok(fileEntry) {
    alert("OK");
}

在另一方面 requestFileSystem 回调定期调用。

On the other hand requestFileSystem callbacks are called regularly.

推荐答案

在问题上的code段不会在Android中因科尔多瓦缺陷工作:的 https://issues.apache.org/jira/browse/CB-7273

The code snippet in the question will not work in Android due to a Cordova defect: https://issues.apache.org/jira/browse/CB-7273.

要取得进一步进展,这将有助于了解你有什么计划文件本身。

To progress further, it would help to understand what are your plans for the file itself.


  • 请您只是想将文件路径

  • 或你想要改变文件的内容?

  • 或者

您可以在这个问题/答案阅读更多有关在科尔多瓦文件系统操作:<一个href=\"http://stackoverflow.com/questions/16399465/where-does-localfilesystem-persistent-point-to\">Where确实LocalFileSystem.PERSISTENT点?

You can read more about file system operations in Cordova in this question/answer: Where does LocalFileSystem.PERSISTENT point to?

这篇关于科尔多瓦resolveLocalFileSystemURL回调没有被解雇的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆