File: Directory.hs

package info (click to toggle)
haskell98-report 20030706-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,888 kB
  • ctags: 80
  • sloc: haskell: 3,810; makefile: 336; sh: 4
file content (41 lines) | stat: -rw-r--r-- 1,197 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
module Directory ( 
    Permissions( Permissions, readable, writable, executable, searchable ), 
    createDirectory, removeDirectory, removeFile, 
    renameDirectory, renameFile, getDirectoryContents,
    getCurrentDirectory, setCurrentDirectory,
    doesFileExist, doesDirectoryExist,
    getPermissions, setPermissions,
    getModificationTime ) where

import Time ( ClockTime )

data Permissions = Permissions {
			readable,   writable,
			executable, searchable :: Bool
		   }

instance Eq   Permissions where ...
instance Ord  Permissions where ...
instance Read Permissions where ...
instance Show Permissions where ...



createDirectory 	:: FilePath -> IO ()
removeDirectory 	:: FilePath -> IO ()
removeFile 		:: FilePath -> IO ()
renameDirectory 	:: FilePath -> FilePath -> IO ()
renameFile 		:: FilePath -> FilePath -> IO ()

getDirectoryContents 	:: FilePath -> IO [FilePath]
getCurrentDirectory 	:: IO FilePath
setCurrentDirectory 	:: FilePath -> IO ()

doesFileExist		:: FilePath -> IO Bool
doesDirectoryExist	:: FilePath -> IO Bool

getPermissions		:: FilePath -> IO Permissions
setPermissions		:: FilePath -> Permissions -> IO ()

getModificationTime	:: FilePath -> IO ClockTime