Open tazik561 opened 3 years ago
Hey @tazik561, looks like you are trying to copy a file object and copying it into a folder object. Trying correcting
final evbDirectory = await Directory('${dir!.path}/evb').create(recursive: true);
to
final evbDirectory = await File('${dir!.path}/evb').create(recursive: true);
I am trying to copy hive box to my mobile storage. After acception sufficient permissions, I run my method:
and :
But I got this error:
E/flutter (14955): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: FileSystemException: Cannot copy file to '/storage/emulated/0/Android/data/com.example.english_vocabulary_builder/files/evb', path = '/data/user/0/com.example.english_vocabulary_builder/app_flutter/vocabularybox.hive' (OS Error: Is a directory, errno = 21)
There is hive file inside app_flutter :
https://pasteboard.co/KdI1Juxp.png
this is doctor: