Может ли кто-нибудь помочь мне решить эту проблему?
Код
Код: Выделить всё
bool statusFileExists = await status.exists();
if (!statusFileExists) {
debugPrint("File does not exist at path: $statusPath");
return true;
}
debugPrint("file exists: $statusFileExists");
debugPrint(" file exists on '$statusPath'");
debugPrint("stat: ${await status.stat()}");
if (await Permission.storage.request().isGranted) {
await status.delete(recursive: true); // this line is throwing exception
}
Код: Выделить всё
Exception has occurred.
PathNotFoundException (PathNotFoundException: Deletion failed, path = '/storage/emulated/0/Download/Saved Statuses/IMG_20240630_100000.jpg' (OS Error: No such file or directory, errno = 2))
Код: Выделить всё
manifest xmlns:android="http://schemas.android.com/apk/res/android">
Подробнее здесь: [url]https://stackoverflow.com/questions/78688898/facing-issue-while-deleting-file-from-download-directory-on-android-12-or-more[/url]