I'm filling a JTree with user system files/folders and I'm using the File class for this purpose. I noticed the JTree displays also hidden & system files which will confuse the user of my application. I first thought to use some File method & isHidden() was first candidate.I first tried
but that's not working ..i tried
which seems to do better but I'm still incapable of solving this issue. I thought using Runtime.exec() but don't know what commands to use to check system & hidden files (this should take in consideration the OS win or Mac).
can some one suggest me a good and simple solution for this problem ? thanks.