
[英]why i can not find the folder i have created using path _provider, i searched for it in the file manager app(android 12) but i did not find it?
[英]why file manager on android 12 did not show the folder i have created using flutter,path provider package?
注意我使用了另一个文件管理器,我可以看到我创建的文件夹,但我不知道为什么它没有显示在原始文件管理器中。
代码
Future<String> getFilePath() async {
Directory endPointDirectory=Directory("");
const String folderName="cameraFlutter";// there folder where we will save files to it
var directory=getExternalStorageDirectory()
.then((value) async {
final Directory endPointDirectory=Directory("${value!.path}/$folderName");
if (await endPointDirectory.exists()) {
print("exist");
print(endPointDirectory.path);
} else {
//if the folder not exists create folder and then return its path
print("not exist");
await endPointDirectory.create(recursive: true);
}
}).catchError((onError){
print(onError.toString());
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.