21245cf866616e14657b41da87daee8f4dc76b1b
[haskell-report.git] / report / lib-hdrs / Directory.hs
1 module Directory (
2 Permissions( Permissions, readable, writable,
3 executable, searchable ),
4 createDirectory, removeDirectory, removeFile,
5 renameDirectory, renameFile, getDirectoryContents,
6 getCurrentDirectory, setCurrentDirectory,
7 doesFileExist, doesDirectoryExist,
8 getPermissions, setPermissions,
9 getModificationTime ) where
10
11 import Time ( ClockTime )
12
13 data Permissions = Permissions {
14 readable, writable,
15 executable, searchable :: Bool
16 }
17
18 instance Eq Permissions where ...
19 instance Ord Permissions where ...
20 instance Read Permissions where ...
21 instance Show Permissions where ...
22
23
24
25 createDirectory :: FilePath -> IO ()
26 removeDirectory :: FilePath -> IO ()
27 removeFile :: FilePath -> IO ()
28 renameDirectory :: FilePath -> FilePath -> IO ()
29 renameFile :: FilePath -> FilePath -> IO ()
30
31 getDirectoryContents :: FilePath -> IO [FilePath]
32 getCurrentDirectory :: IO FilePath
33 setCurrentDirectory :: FilePath -> IO ()
34
35 doesFileExist :: FilePath -> IO Bool
36 doesDirectoryExist :: FilePath -> IO Bool
37
38 getPermissions :: FilePath -> IO Permissions
39 setPermissions :: FilePath -> Permissions -> IO ()
40
41 getModificationTime :: FilePath -> IO ClockTime
42