Hello,
I had done a program related to this topic, just check it out
Code:
class mfl extends File {
Public mfl(String file){
great(file);
}
//[...] Another constructor
Public boolean exists(){
if (great.exists()) / / This code was tested
return true; / / With this part with commentary
File drc = new File(getParent());
String all [] dr =.list();
for (String one: all){
if (one.equalsIgnoreCase(getName()));
return true;
}
return false;
}
Public static void hand(String [] arg){
mfl mf = new mfl("c" + File.separator + "IO.SYS"); / / Windows only
p.rintln("file exist"+ mf.exists());
}
}
Bookmarks