Re: [Haskell-cafe] System.Posix.Files.isDirectory and System.Posix.Files.isSymbolicLink

2009-02-02 Thread Brandon S. Allbery KF8NH
On 2009 Feb 1, at 17:49, Erik de Castro Lopo wrote: The following code creates a symbolic link in the current directory and then uses System.Posix.Files.getFileStatus to get the status of the link. However, isDirectory returns True and isSymbolicLink returns False which is very different from wh

Re: [Haskell-cafe] System.Posix.Files.isDirectory and System.Posix.Files.isSymbolicLink

2009-02-01 Thread Erik de Castro Lopo
Duncan Coutts wrote: > No, it is the correct POSIX behaviour. You are thinking of lstat() which > is what getSymbolicLinkStatus uses. The getFileStatus function calls > stat(). Maybe this is a naming issue. In C I think of "lstat" as "stat" but don't follow link. If getSymbolicLinkStatus was in

Re: [Haskell-cafe] System.Posix.Files.isDirectory and System.Posix.Files.isSymbolicLink

2009-02-01 Thread Duncan Coutts
On Mon, 2009-02-02 at 09:49 +1100, Erik de Castro Lopo wrote: > Hi all, > > The following code creates a symbolic link in the current directory > and then uses System.Posix.Files.getFileStatus to get the status of > the link. > > However, isDirectory returns True and isSymbolicLink returns False

Re: [Haskell-cafe] System.Posix.Files.isDirectory and System.Posix.Files.isSymbolicLink

2009-02-01 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote: > The following code creates a symbolic link in the current directory > and then uses System.Posix.Files.getFileStatus to get the status of > the link. If I use getSymbolicLinkStatus instead of getFileStatus I get the result I expect. However, using getSymbolicLinkStatu

[Haskell-cafe] System.Posix.Files.isDirectory and System.Posix.Files.isSymbolicLink

2009-02-01 Thread Erik de Castro Lopo
Hi all, The following code creates a symbolic link in the current directory and then uses System.Posix.Files.getFileStatus to get the status of the link. However, isDirectory returns True and isSymbolicLink returns False which is very different from what the stat() system call on a POSIX system w