I have rather a very basic question but somehow it is confusing to me. Normally to check the existence of both file and directory we can do so by using boolean file.exists()
However i am wondering, is there any way that one can determine if given path is a directory or a file.
It would be nice if you can provide some short example using java.
Yes, from the documentation, there are the methods
isFileandisDirectory