plus.io.requestFileSystem(
plus.io.PUBLIC_DOCUMENTS, // 程序公用文档目录常量
fs => {
**
// 绝对路径,以"file://"开头。加粗样式 // /sdcard–>为根目录
**
fs.root.getFile(‘file:///sdcard/Pictures/aaaa/123.xlsx’, {
create: false // 文件不存在则创建
}, fileEntry => {
},error => {
console.log('2新建获取文件失败', JSON.stringify(error))
plus.nativeUI.toast("获取文件失败,请重启应用", {
background: '#ffa38c',
})
});
},
e => {
plus.nativeUI.toast("请求系统失败,请重启应用", {
background: '#ffa38c',
})
}
);