blob: 12c70c98b45866e6f4a7bffb482fba579644e7c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
-- !!! test ioeGetFileName
import System.IO
import System.IO.Error
main = do
h <- openFile "ioeGetFileName001.hs" ReadMode
hSeek h SeekFromEnd 0
(hGetChar h >> return ()) `catch`
\e -> if isEOFError e
then print (ioeGetFileName e)
else putStrLn "failed."
|