In Dart would like to check if a directory exist but without knowing a substring of this directory :
eg :
dir = preview/1552146038702.jpg.1--001--001.html.test.jpg
I tried :
io.Directory(await dir).exists().then((exist){
but in the dir I don't know 1--001--001.html
Any idea?
This works for me, hope my answer help
final path = '/storage/emulated/0/Download';
final checkPathExistence = await Directory(path).exists();
Directory.exists()
provides this information
bool exists = await Directory(path).exists();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With