Hi,

Hope someone can help me out with this little problem I'm having.

I have a directory /home/paddy/test which contains one sub-directory and one symbolic link:

[EMAIL PROTECTED] test]# ls -lh
total 12K
drwxr-xr-x  2 root root 4.0K Oct  3 20:38 directory
lrwxrwxrwx  1 root root    4 Oct  3 20:39 SYMLINK -> /tmp
-rw-r--r--  1 root root  535 Oct  3 20:41 test.cs
-rwxr-xr-x  1 root root 3.5K Oct  3 20:41 test.exe
[EMAIL PROTECTED] test]#


When I run the following code:


using System;
using System.Data;
using System.IO;
using Mono.Unix;

namespace test
{
       class test
       {
               static void Main(string[] args)
               {
UnixDirectoryInfo test1 = new UnixDirectoryInfo("/home/paddy/test/directory");

                       Console.WriteLine(test1.FullName);
                       Console.WriteLine(test1.IsSymbolicLink);

UnixDirectoryInfo test2 = new UnixDirectoryInfo("/home/paddy/test/SYMLINK");

                       Console.WriteLine(test2.FullName);
                       Console.WriteLine(test2.IsSymbolicLink);
               }
       }
}

I get the output:

/home/paddy/test/directory
False
/home/paddy/test/SYMLINK
False


Should I get True for the symbolic link /home/paddy/test/SYMLINK? Am I misunderstanding the meaning of the property IsSymbolicLink or is it just my dodgy code?

Paddy

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to