I am looking for a way to identify if a disk file, represented by an object of the File class, is a softlink or not.
Basically, I am working on a File Search utility that recursively browses the file structure on a unix machine to find a file with a particular name. The Problem that i am facing is with softlinks. i.e. my prog enters into an infinite loop when it encounters a softlink. For e.g. if a softlink /root/.openoffice/user/work points to /root directory, my program would enter into an infinite loop as everytime it encoulters /root/.openoffice/user/work it sould actually get into /root directory.
If some one can provide a solution or a web-link that throws some ligt on this issue... Thanks is advance...
Regards, Parth Bhatt
If your new Big Idea doesn't scare the hell out of you, <br />it's probably not a "new Big Idea".
Interestingly, on OS X, the File.isFile and isDirectory methods report that a link to a directory is a directory, while an alias to a directory is a file. Quite confusing. [ May 09, 2007: Message edited by: Ulf Dittmer ]