projects
/
haskell-directory.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Move tests from testsuite/tests/ghc-regress/lib/Directory
[haskell-directory.git]
/
tests
/
directory001.hs
1
import IO
2
3
import Directory
4
5
main = do
6
createDirectory "foo"
7
h <- openFile "foo/bar" WriteMode
8
hPutStr h "Okay\n"
9
hClose h
10
renameFile "foo/bar" "foo/baz"
11
renameDirectory "foo" "bar"
12
h <- openFile "bar/baz" ReadMode
13
stuff <- hGetContents h
14
putStr stuff
15
-- hClose h -- an error !
16
removeFile "bar/baz"
17
removeDirectory "bar"