0

我在android中使用window.requestFileSystem。但它失败并出现错误代码 9。我在这里阅读了没有 SD 卡的 android 设备的问题。这是我正在使用的代码

window.requestFileSystem(2, 0, function(file_system) {
                console.log('got fs');
                callback(null, file_system);
            }, function(err) {
                console.log('not getting library fs'+err.code);
                callback(err);
            });

我如何在android中使用它?

4

1 回答 1

0

根据官方文档,in的第一个参数requestFileSystem应该是常量LocalFileSystem.PERSISTENT或者LocalFileSystem.TEMPORARY

尝试以下标准语句:

window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(f){ /* sucess */ }, function(e){ /* error */);
于 2013-10-02T00:50:46.407 回答