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