2

In .NET, what is the best way to identify if a directory is a symlink pointing to a network location?

To determine if it's a symbolic link OR an NTFS junction point we can use:

System.IO.File.GetAttributes(folderName).HasFlags(FileAttributes.ReparsePoint);

But that's not precise enough as it returns true for junction points as well.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Vasile Mare
  • 189
  • 9
  • duplicate http://stackoverflow.com/questions/1485155/check-if-a-file-is-real-or-a-symbolic-link there are some answers but nothing has been accepted – Bala R Apr 20 '11 at 00:40
  • 2
    "Check if a file is real or a symbolic link" is related but it's not a duplicate. The difference is file vs folder and I also want to determine if a symlink points to a network resource. – Vasile Mare Apr 20 '11 at 01:39

0 Answers0