简体   繁体   English

Ionic (v3.19.1):使用 ionic-native/file 创建的文件不可见

[英]Ionic (v3.19.1): Created file is not visible using ionic-native/file

I create a file with the plugin ionic-native/file.我使用插件 ionic-native/file 创建了一个文件。 ( docs/native/file/ ) 文档/本机/文件/

The source code looks like this:源代码如下所示:

let path = this.file.externalRootDirectory + "Download";        

this.file.createFile(path, "test.txt", true).then(event => {
    this.file.writeExistingFile(path, "test.txt", "Hello 
        World!").then(event => {
           console.log('success');
        }).catch(event => {});
    console.log('success');
}).catch(event => {});

Everything works to this point.一切正常。 The file is created and then filled with content.创建文件,然后填充内容。 The problem is that the file is not visible in the Downloads folder.问题是该文件在下载文件夹中不可见。 After the installation of an additional App (FXexplorer) you can see that the file exists.安装附加应用程序(FXexplorer)后,您可以看到该文件存在。

View of the Download folder with FXexplorer :使用 FXexplorer查看下载文件夹

在此处输入图片说明

View of the Download folder with the Android Download Manager :使用 Android 下载管理器查看下载文件夹

在此处输入图片说明

How can I solve this problem?我该如何解决这个问题?

按照下面的链接它可能会帮助您https://ionicframework.com/docs/native/file/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM