private void nlzFilesFirst(File[] af_sub, int i_level, String s_dbgIndent) {
//This extra work should only be done when explicitely
//asked for, or for when debugging output would make no
//sense without it.
VWNamed vwnFiles = new VWNamed(true);
VWNamed vwnDirs = new VWNamed(true);
for(int i = 0; i < af_sub.length; i++) {
if(af_sub[i].isFile()) {
vwnFiles.add(new FileNamed(af_sub[i]));
} else {
vwnDirs.add(new FileNamed(af_sub[i]));
}
}
//Now we can list the files first (in alpha order), and
//then dirs (in alpha order).
while(vwnFiles.size() > 0) {
File f = ((FileNamed)vwnFiles.getNamed(0)).getFile();
vwnFiles.getVector().removeElementAt(0);
//Add this path to the vector.
vws.add(f.getPath());
//1 DEBUGGING
// debug(i_level + "/" + getDSConfig().getLvlsMaxDepth() + s_dbgIndent + f.getName());
//1 REAL
debugNoln(".");
}
while(vwnDirs.size() > 0) {
File f = ((FileNamed)vwnDirs.getNamed(0)).getFile();
vwnDirs.getVector().removeElementAt(0);
//Add this path to the vector.
vws.add(f.getPath());
//Directory