【问题标题】:fullPath in Cordova returning as "/"Cordova 中的 fullPath 返回为“/”
【发布时间】:2017-11-08 17:35:19
【问题描述】:

我发现 Cordova 中的 fullPath 返回为“/”并且 FileEntry.toURL() 和 DirectoryEntry.toURL() 返回格式为“file:///var/mobile/Containers/Data/Application//Documents”的路径,而不是 “cdvfile://localhost/persistent/path/to/file”。

这是在将适用于 Cordova 2.7 的内容升级到 7.0.1(使用 cordova 文件插件):有人对我可能遗漏的内容有任何想法吗?

【问题讨论】:

    标签: cordova cordova-plugins


    【解决方案1】:

    原来答案是fileSystem.root.toInternalURL()。

    这会返回格式为“cdvfile://localhost/persistent/”而不是“file:///var/mobile/Containers/Data/Application//Documents”的内容

    【讨论】:

      猜你喜欢
      • 2017-08-02
      • 1970-01-01
      • 2016-09-23
      • 1970-01-01
      • 2016-12-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多