![]() |
The Java Developers Almanac 1.4 |
|
e32. Listing the File System RootsUNIX 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[] roots = File.listRoots();
for (int i=0; i<roots.length; i++) {
process(roots[i]);
}
e29. Creating a Directory e30. Deleting a Directory e31. Listing the Files or Subdirectories in a Directory e33. Traversing the Files and Directories Under a Directory
© 2002 Addison-Wesley. |