I want to check if String
is valid as a local path in Dart, (It doesn't matter whether the path exists or not), I want to check if the String
is valid to be used as a local path or not.
similar question with Python
I want to check if String
is valid as a local path in Dart, (It doesn't matter whether the path exists or not), I want to check if the String
is valid to be used as a local path or not.
similar question with Python
File
Async
File("yourfile").exists()
sync
File("/sdcard/").existsSync()
Directory
Directory("your directory").exists()
Directory("/sdcard/").existsSync()
use with try catch
Both cases you need android permission to access the file otherwise you will get a file or directory or path not exist exception. if already file exist