FileSystemManager.rename()bug
发布于 5 年前 作者 mayong 2725 次浏览 来自 问答

-执行到这  任何提示也没有。。。。代码如下:

//下载文件

        downfile: function () {

                const manage = wx.getFileSystemManager();

                wx.downloadFile({

                        url: http://www.zzs5.com/uploadfile/2017/0320/20170320122300245.rar,

                        success: function (res) {

                                console.log(res);

                                var savePath = “${ wx.env.USER_DATA_PATH }/save/”;

                                manage.rename({

                                        oldPath: res.tempFilePath,

                                        newPath: savePath,

                                        success: function (res) {

                                                console.log(res.tempFilePath);

                                        }

                                });

                        }

                });

        },

console最后的提示是 console.log(res);的信息。 就啥都没了。temp 文件夹下有下载的文件,log记录这是最后一条 2019-3-19 11:5:46 [log] wx.downloadFile success callback with msg downloadFile:ok这是咋回事??

2 回复

使用 FileSystemManager.saveFile

()

这个的时候   提示没有权限打开文件夹。。。 why?why?why?why?why?why?

回到顶部