New test.
[mono.git] / mcs / class / corlib / System.IO / MonoIO.cs
index f5ccf450eaf02e1f3fe6fd77646409a0f47458c4..21c21b236c99a17c83d9eda1879e7ad9050f716f 100644 (file)
@@ -208,6 +208,20 @@ namespace System.IO
                        return true;
                }
 
+               public static bool ExistsSymlink (string path,
+                                                 out MonoIOError error)
+               {
+                       FileAttributes attrs = GetFileAttributes (path,
+                                                                 out error);
+                       if (attrs == InvalidFileAttributes)
+                               return false;
+                       
+                       if ((attrs & FileAttributes.ReparsePoint) == 0)
+                               return false;
+
+                       return true;
+               }
+
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                public extern static bool GetFileStat (string path,
                                                       out MonoIOStat stat,