diff options
author | Joey Hess <joey@kitenet.net> | 2011-09-23 18:13:24 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-09-23 18:13:24 -0400 |
commit | 4bf1a5ef59026a095abf751ea60b586c299aa0b9 (patch) | |
tree | 067cd0813f3f315475b3b958762ed569ae95e8de /Utility.hs | |
parent | d75da353b9905bb5757df08520e63607fbfd2073 (diff) |
refactor
Diffstat (limited to 'Utility.hs')
-rw-r--r-- | Utility.hs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/Utility.hs b/Utility.hs index ce1736348..a3d461d28 100644 --- a/Utility.hs +++ b/Utility.hs @@ -8,7 +8,6 @@ module Utility ( hGetContentsStrict, readFileStrict, - unsetFileMode, readMaybe, viaTmp, withTempFile, @@ -24,12 +23,9 @@ module Utility ( import IO (bracket) import System.IO import System.Posix.Process hiding (executeFile) -import System.Posix.Files -import System.Posix.Types import System.Posix.User import System.FilePath import System.Directory -import Foreign (complement) import Utility.Path import Data.Maybe import Control.Monad (liftM) @@ -43,13 +39,6 @@ hGetContentsStrict h = hGetContents h >>= \s -> length s `seq` return s readFileStrict :: FilePath -> IO String readFileStrict f = readFile f >>= \s -> length s `seq` return s -{- Removes a FileMode from a file. - - For example, call with otherWriteMode to chmod o-w -} -unsetFileMode :: FilePath -> FileMode -> IO () -unsetFileMode f m = do - s <- getFileStatus f - setFileMode f $ fileMode s `intersectFileModes` complement m - {- Attempts to read a value from a String. -} readMaybe :: (Read a) => String -> Maybe a readMaybe s = case reads s of |