diff options
author | Joey Hess <joey@kitenet.net> | 2011-03-29 18:21:05 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-03-29 18:21:05 -0400 |
commit | 3adb48f46a553e8de926e2ce93ea5162dd589111 (patch) | |
tree | 16eca2edd55e6788bf9d9cd24ccd42f9ca37c438 /Remote/S3.hs | |
parent | d8154eaad3f39e045d7abba187a7d2c1399b89dc (diff) |
more S3 docs
Diffstat (limited to 'Remote/S3.hs')
-rw-r--r-- | Remote/S3.hs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Remote/S3.hs b/Remote/S3.hs index 3265ced78..b3a910639 100644 --- a/Remote/S3.hs +++ b/Remote/S3.hs @@ -71,7 +71,7 @@ genRemote r u c cst = this name = Git.repoDescribe r, storeKey = s3Store this, retrieveKeyFile = s3Retrieve this, - removeKey = error "TODO removekey", + removeKey = s3Remove this, hasKey = s3CheckPresent this, hasKeyCheap = False, config = c @@ -178,3 +178,12 @@ s3Retrieve r k f = s3Action r $ \(conn, bucket) -> do Left e -> do warning $ prettyReqError e return False + +s3Remove :: Remote Annex -> Key -> Annex Bool +s3Remove r k = s3Action r $ \(conn, bucket) -> do + res <- liftIO $ deleteObject conn $ bucketKey bucket k L.empty + case res of + Right _ -> return True + Left e -> do + warning $ prettyReqError e + return False |