Monday, November 27, 2006

Listing the File System Roots

UNIX file systems have a single root, `/'. On Windows, each drive is a root. For example the C drive is represented by the root C:\.


File[] filerots = File.listRoots();
for (int i=0; i < filerots.length; i++) {
process(roots[i]);
}

No comments: