hmmmmm. I think i have it
Java: |
public void addDir(String path, boolean auto){
String[] s = new File(path).list();
for (int i = 0 ; i < s.length ; i++){
File f = new File(s[i]);
if (f.isDirectory())
addDir(f.getAbsolutePath(), auto);
else if (f.isFile())
addFile(f.getAbsolutePath(), auto);
}
} |
hmmmmm. doesn't seem to work. any ideas?
crap. [slaps forehead] im an idiot. this is a working version:
Java: |
public void addDir(String path, boolean auto){
File[] f = new File(path).listFiles();
for (int i = 0 ; i < f.length ; i++){
if (f[i].isDirectory())
addDir(f[i].getAbsolutePath(), auto);
else if (f[i].isFile())
addFile(f[i], auto);
}
} |
my question now is:
What is Java's definition of a [i]normal file. Is a hidden file normal?
Quote:
A file is normal if it is not a directory and, in addition, satisfies other system-dependent criteria.
Do these system-dependent criteria specify that it has to be visible(not hidden)?