【发布时间】:2017-08-23 10:39:46
【问题描述】:
此 Cordova 代码适用于 iOS 和大多数 Android 设备,但在某些三星设备上失败:
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFileSystem, gotFileError);
function gotFileSystem(fs)
{
fs.root.getDirectory(
'my_folder',
{create: true},
function (entry) {
// Yay! Got the directory,
// unless running certain Samsung Android devices,
// in which case the "gotFileError" function will
// run with the error FileError.PATH_EXISTS_ERR
},
gotFileError
);
});
三星怎么了?
或者,更重要的是,我怎样才能在所有三星设备上也能做到这一点?
【问题讨论】:
-
不要尝试创建已经存在的目录。
-
@greenapps - 你将如何检查目录是否已经存在?
-
对不起。我不使用 Cordova。
标签: android cordova samsung-mobile cordova-plugin-file