I'm trying to make a list, set, map, (alright, I really don't care what it's called, as long as it works!

) of all of the directories and files on my hard drives.
I've started writing code. Found some on a website, and have tried to implement it. Here's the problem. Array, Vector, and HashSet all to up to int size, or 32,000 + entries. My problem is that I currently have over 100,000 files on one drive alone.
To be fair, I've only compiled it. Haven't run it yet. I'm not sure how many bugs in it! However, at this point, I'm more concerned with how to get a real list of the complete file names including drive, sub-directory, and file names.
Here's my code:
package BackupClient;
import java.io.*;
import java.util.Vector;
class DirectoryTree {
private Vector files; // here's the main table
private Vector directories;
protected long totalEntries() {
return (long) files.size();
}
protected
String getFirstDirectory() {
return (String) directories.firstElement();
}
protected String getDirectory(int i) {
return (String) directories.get( i );
}
protected String getFirstFile() {
return (String) files.firstElement();
}
protected String getFile( int i ) {
return (String) files.get(i);
}
/** Creates a new instance of Directory */
protected void DirectoryTree() {
files = new Vector();
directories = new Vector();
File dir = new File("c:\\");
visitAllDirsAndFiles(dir);
}
// Put all File names into lhs...
private void visitAllDirsAndFiles(File dir) {
// first we add the file name
if ( dir.isFile()) {
files.addElement(dir);
}
if (dir.isDirectory()) {
String[] children = dir.list();
for (int i=0; i<children.length; i++) {
directories.addElement(dir);
visitAllDirsAndFiles(new File(dir, children[i]));
} // for
} else {
}// if
} // visitAllDirsAndFiles
} // Directory
Do I really have to go to an RDBMS and make a table at this point already?
Any thoughts would be appreciated.
Marcus Laubli