[Haskell-cafe] Infinite loop?

Donn Cave donn at drizzle.com
Sun Feb 19 13:08:43 EST 2006


Quoth Barbier de Reuille Pierre <pierre.barbier at cirad.fr>:
| On Fri, 17 Feb 2006 17:26:08 +0000
| Jon Fairbairn <jon.fairbairn at cl.cam.ac.uk> wrote:
|
| > On 2006-02-17 at 09:22PST Jared Updike wrote:
| > > Yep. change one line to:
| > > 
| > >    entry <- if isdir && name /= "." && name /= ".."
| > > 
| > > and it does in fact work.
| > 
| > Only if no-one has been tricky with symbolic links.
| > 
|
| And how can you, in Haskell, detect symbolic links ?

I refer you to the documentation in System.Posix.Files, especially
getFileStatus :: FilePath -> IO FileStatus, and
isSymbolicLink :: FileStatus -> Bool.  I don't think I've used this
function, but it looks promising.

	Donn Cave, donn at drizzle.com


More information about the Haskell-Cafe mailing list