ref: 48d806f9e0757baedb656b43a28dbb9af6e14b0b
dir: /lib/System/Directory.hs/
module System.Directory(removeFile) where
import Prelude
import Foreign.C.String
import Foreign.Ptr
foreign import ccall "unlink" c_unlink :: CString -> IO Int
removeFile :: FilePath -> IO ()
removeFile fn = do
r <- withCAString fn c_unlink
when (r /= 0) $
error "removeFile failed"