[Haskell-cafe] An exceptional exception

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Fri Nov 9 17:42:55 EST 2007


On Nov 9, 2007, at 15:01 , Andrew Coppin wrote:

> 4. Not actually related to exceptions, but doesDirectoryExist "C:\"  
> yields False. (Even though getDirectoryContents "C:\" yields the  
> correct result.) So I can't even use that to filter out invalid  
> directory names.

This is an ancient and extremely annoying general DOS/Windows wart.   
The root directory has several unexpected behaviors, because it is  
*not* in fact a directory (or wasn't on FAT, and the behaviors have  
to be kept for backward compatibility).

(You're also not the only one to be frustrated by having to parse  
stringified I/O exceptions to decipher them.)

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH




More information about the Haskell-Cafe mailing list