logo       

Posix.getFileStatus: msg#00077

lang.haskell.glasgow.bugs

Subject: Posix.getFileStatus

(1) I think Posix.getFileStatus should respond to a file which isn't there with
something rather more helpful than
"system error". For example, a "No such file or directory" message.

(2) The logical way of spotting whether a file is actually there is the
queryFile function, documented for example here:

http://haskell.cs.yale.edu/ghc/docs/latest/html/hslibs/files-and-directories.html
But sadly the queryFile function does not appear to be in the Posix module! At
least not for
ghc5.04.2.

Good thing there's a Directory.doesFileExist function! Of course that's not
quite the same, since it
only checks if there is a normal file of that name (it returns False for a
directory).


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise