yasukotelin / ext_storage

ext_storage is minimal flutter plugin that provides external storage path and external public storage path.
MIT License
29 stars 61 forks source link

No such file or directory #18

Open gtuceturan opened 2 years ago

gtuceturan commented 2 years ago

Hello I'm using

ExtStorage.getExternalStoragePublicDirectory(ExtStorage.DIRECTORY_DOCUMENTS)

String fileDrc=await ExtStorage.getExternalStoragePublicDirectory(ExtStorage.DIRECTORY_DOCUMENTS); final path= Directory( fileDrc+ "/Reports");

  if (!(await path.exists()))
    path.create();

but I get error

FileSystemException: Creation failed, path = '/storage/emulated/0/Documents/Reports' (OS Error: No such file or directory, errno = 2), stack trace: #0