projects
/
haskell-directory.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0924cc3
)
Add emptyPermissions
author
Ian Lynagh
<igloo@earth.li>
Wed, 11 Aug 2010 18:27:30 +0000
(18:27 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Wed, 11 Aug 2010 18:27:30 +0000
(18:27 +0000)
System/Directory.hs
patch
|
blob
|
history
diff --git
a/System/Directory.hs
b/System/Directory.hs
index
1291d71
..
e179c93
100644
(file)
--- a/
System/Directory.hs
+++ b/
System/Directory.hs
@@
-56,6
+56,7
@@
module System.Directory
-- $permissions
, Permissions
-- $permissions
, Permissions
+ , emptyPermissions
, readable -- :: Permissions -> Bool
, writable -- :: Permissions -> Bool
, executable -- :: Permissions -> Bool
, readable -- :: Permissions -> Bool
, writable -- :: Permissions -> Bool
, executable -- :: Permissions -> Bool
@@
-163,6
+164,14
@@
data Permissions
executable, searchable :: Bool
} deriving (Eq, Ord, Read, Show)
executable, searchable :: Bool
} deriving (Eq, Ord, Read, Show)
+emptyPermissions :: Permissions
+emptyPermissions = Permissions {
+ readable = False,
+ writable = False,
+ executable = False,
+ searchable = False
+ }
+
setOwnerReadable :: Bool -> Permissions -> Permissions
setOwnerReadable b p = p { readable = b }
setOwnerReadable :: Bool -> Permissions -> Permissions
setOwnerReadable b p = p { readable = b }