summaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-11-20 13:42:13 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-11-20 13:42:13 -0400
commitc8999b8a8b17a225178bb314e1c7c9bb7538e4aa (patch)
tree87bfa5c979e83bae5250c893267ccb8aeb7d4bfb /Utility
parent22265ce41a4bb0ada9070a0ae358a9f321f437be (diff)
add allowRead
Diffstat (limited to 'Utility')
-rw-r--r--Utility/FileMode.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Utility/FileMode.hs b/Utility/FileMode.hs
index 1307d3842..46c6a31f5 100644
--- a/Utility/FileMode.hs
+++ b/Utility/FileMode.hs
@@ -64,6 +64,10 @@ preventWrite f = modifyFileMode f $ removeModes writeModes
allowWrite :: FilePath -> IO ()
allowWrite f = modifyFileMode f $ addModes [ownerWriteMode]
+{- Turns a file's owner read bit back on. -}
+allowRead :: FilePath -> IO ()
+allowRead f = modifyFileMode f $ addModes [ownerReadMode]
+
{- Allows owner and group to read and write to a file. -}
groupSharedModes :: [FileMode]
groupSharedModes =