J
Jim Showalter
Hello,
Here is the problem. Assume that 'c:\link' is a shortcut to the directory
'c:\foo\bar\dir' and that the latter contains the file info.txt.
The following prints false
File f = new File("c:\link\info.txt");
System.out.println(f.canRead());
while this prints true
File f = new File("c:\foo\bar\dir\info.txt");
System.out.println(f.canRead());
Thus, links don't appear to be followed in Windows (the above returns true
for both cases on Solaris). Any suggestions on how to resolve the shortcut
to the proper target? I have had no success with any of the *path* methods
in the File class.
Thanks,
Jim
Here is the problem. Assume that 'c:\link' is a shortcut to the directory
'c:\foo\bar\dir' and that the latter contains the file info.txt.
The following prints false
File f = new File("c:\link\info.txt");
System.out.println(f.canRead());
while this prints true
File f = new File("c:\foo\bar\dir\info.txt");
System.out.println(f.canRead());
Thus, links don't appear to be followed in Windows (the above returns true
for both cases on Solaris). Any suggestions on how to resolve the shortcut
to the proper target? I have had no success with any of the *path* methods
in the File class.
Thanks,
Jim