
10 Jun
2003
10 Jun
'03
7:10 a.m.
I'm trying to compile the haskell web server (from the haskell-libs project at sf.net) with ghc6 and I'm stuck on the last function in Util.hs:
statMaybe filename = do maybe_stat <- tryJust ioErrors (getFileStatus filename) case maybe_stat of Left e -> do errno <- getErrorCode if errno == eNOENT then return Nothing else ioError e Right stat -> return (Just stat)
What are the equivalents for getFileStatus and getErrorCode these days?
I suppose Foreign.C.Error.getErrno might substitute for getErrorCode, but I'm stumped on getFileStatus.
You're right about getErrno. getFileStatus is available from System.Posix. Cheers, Simon
8029
Age (days ago)
8029
Last active (days ago)
0 comments
1 participants
participants (1)
-
Simon Marlow