ZVON > References > Haskell reference
| Indexes | Syntax | Prelude | Ratio | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | >> Directory << | System | Time | Locale | CPUTime | Random

Module: Directory
Function: removeFile
Type: FilePath -> IO ()
Description: removeFile file removes the directory entry for an existing file file, where file is not itself a directory. The implementation may specify additional constraints which must be satisfied before a file can be removed (for instance, the file may not be in use by other processes)
Related:

Example 1
Program source: 

import IO
import Directory

main = do x <- doesFileExist "/tmp/foo.txt"
	  print x
	  removeFile "/tmp/foo.txt"
	  y <- doesFileExist "/tmp/foo.txt"
	  print y

Output: True

Output: False