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: removeDirectory
Type: FilePath -> IO ()
Description: removeDirectory dir removes an existing directory dir. The implementation may specify additional constraints which must be satisfied before a directory can be removed (for instance, the directory has to be empty, or may not be in use by other processes). It is not legal for an implementation to partially remove a directory unless the entire directory is removed. A conformant implementation need not support directory removal in all situations (for instance, removal of the root directory)

Example 1
Program source: 

import Directory 

main = aaa "/tmp/FOO"

aaa ddd = do createDirectory ddd
	     d <- doesDirectoryExist ddd
	     print d
	     removeDirectory ddd
	     d <- doesDirectoryExist ddd
	     print d

Output: True

Output: False