提交 fdb47cad 编写于 作者: P PaDoBoo

add getFilesDir err info

Signed-off-by: NPaDoBoo <xuejianwu@huawei.com>
上级 68f53bea
......@@ -123,6 +123,11 @@ getStorage(path: string): Promise&lt;Storage&gt;
var context = featureAbility.getContext()
context.getFilesDir((err, path) => {
if (err) {
console.info("Get the storage failed, path: " + path + '/mystore')
return;
}
console.info('getFilesDir successful. path:' + JSON.stringify(path));
let promisegetSt = dataStorage.getStorage(path + '/mystore')
promisegetSt.then((storage) => {
storage.putSync('startup', 'auto')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册