How can I browse through all the file systems such as C,D,E and so on.. How do I know what drives are present on the computer??
posted 9 years ago
The File class contains all the methods you need. Use listRoots() to find the root drives available, and for each one, use listFiles() to find the files in a given directory. You will probably want to write a recursive method to list the files in each subdirectory. You may also want to use other File methods like isDirectory() and getName(). Hope that helps...