The File.listFiles()
method lists the contents of a folder. On windows however, when you call the method on your root drive, it also yields some - in lack of a better phrase - "virtual" folders (Like "Documents and Settings", which got replaced by "Users" in recent windows versions).
If you then call listFiles() for one of those "virtual" folders, it always returns null. And that's where my problem is, as I want to recursively walk through all the folders. I need a way to filter those folders out and preferably not by checking their names...
There are also some additional folders, that the normal user doesn't see (like "System Volume Information" or the Recycle-bin folder for that drive), and I would be glad to find a method of filtering those out as well without blacklisting the names.
Unfortunately, those folders behave just like real ones. What I'm looking for is something like a File.isSystemFolder()
-method.
I'm really thankful for any advice