Idris2/tests/node/node017/dir.idr

15 lines
433 B
Idris
Raw Normal View History

2020-06-12 23:35:08 +03:00
import System.Directory
main : IO ()
main = do Right () <- createDir "testdir"
| Left err => printLn err
Left err <- createDir "testdir"
| _ => printLn "That wasn't supposed to work"
printLn err
ok <- changeDir "nosuchdir"
printLn ok
ok <- changeDir "testdir"
printLn ok
writeFile "test.txt" "hello\n"
printLn !currentDir