In Java 7 it provides me a way to detect whether a file is symbolic link or not , but why anyone would want to know that .
Files.isSymbolicLink(target) //here target is a path.
I never needed that so far, just wondering what will be the use of it ?
Suppose you're writing a recursive directory copy - you may decide not to follow symbolic links. Or maybe you're creating an archive in a format that doesn't support symbolic links - you may want to warn the user if you encounter one. Or maybe you're writing a diff
program, and you want to skip pairs of files which are actually the same file really.
Basically it's a reasonably common property of some files in a file system - why would Java not want to expose that information?
See more on this question at Stackoverflow