I should get a list of file contained in a directory.
What I do is:
File file = new File(PATH);
for (File index:file.listFiles)
System.out.println(index.toString());
The matter is that doing this I get printed also files I shouldn't see, temporary, for example.
In my test directory I have to file: ciao and test, but when I run my code I see ciao, ciao~, test~, and also other stuff if I modify a file (I suppose they are buffer file).
So, how can I get only true file, as if I was browsing my fileSystem?