[Haskell-cafe] Filesystem questions

Andrew Coppin andrewcoppin at btinternet.com
Fri Oct 12 13:21:07 EDT 2007


I notice that getDirectoryContents appears to return its results in 
alphabetical order. Is this behaviour actually guaranteed?

Related: Is there a way to get rid of "." and ".." in the results? 
(Obviously this causes directory recusion to malfunction.) I can of 
course manually filter them out, but it's annoying.

Finally, why do

  doesDirectoryExist "C:"
  doesDirectoryExist "C:\"

both yield False? (This frequently trips up programs that try to check 
that a destination folder exists.)



More information about the Haskell-Cafe mailing list