new files
This commit is contained in:
parent
3af7344581
commit
86c034bb8b
1364 changed files with 21352 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
import System.IO
|
||||
import System.Directory
|
||||
|
||||
check :: (FilePath -> IO Bool) -> FilePath -> IO ()
|
||||
check p s = do
|
||||
result <- p s
|
||||
putStrLn $ s ++ if result then " does exist" else " does not exist"
|
||||
|
||||
main = do
|
||||
check doesFileExist "input.txt"
|
||||
check doesDirectoryExist "docs"
|
||||
check doesFileExist "/input.txt"
|
||||
check doesDirectoryExist "/docs"
|
||||
Loading…
Add table
Add a link
Reference in a new issue