Answers for "check file exist in android"

1

android studio file exist

File dir = getFilesDir();
File file = new File(dir, filename);
if(filename.exists()){      
//Do something
}else{
// Do something else.
}
Posted by: Guest on October-17-2020
1

check if file.properties is exits android

File file = new File(fileDirectory, "file.txt");
if (file.exists()) {

}
Posted by: Guest on November-27-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language