Created
January 6, 2012 20:06
-
-
Save aluink/1572168 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
store :: FilePath -> B.ByteString -> String -> String -> IO () | |
store tfp bn pn pv = do | |
de <- doesDirectoryExist pnd | |
when de $ removeDirectoryRecursive pnd | |
Tar.unpack packageDir . Tar.read . GZip.decompress =<< LBS.readFile tfp | |
renameFile tfp $ cpackageDir ++ (T.unpack $ decodeUtf8 bn) | |
where | |
pnd = packageDir ++ pn ++ [pathSeparator] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment