Ok, guys, super easy question (it seems weird that Google didn't help me with this one):
import IO
--.... yadda, yadda, yadda
file <- openFile "/some/path" ReadMode
How do I check if the handle that I got from openFile
is a valid handle, i.e. that the file exists and was opened successfully?