summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2021-05-19 20:03:06 +0100
committerNick White <git@njw.name>2021-05-19 20:03:06 +0100
commite1a9b682d3a4b4188399c6fd82357d85c92b51aa (patch)
tree07da82531d73c1b7641c903023002886a411d935
parentcc1db86e1e46d4d00d9c24fb3feb6e9286539404 (diff)
Add basic DeleteObjects implementation to local.go
-rw-r--r--local.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/local.go b/local.go
index 31e44a9..816b44b 100644
--- a/local.go
+++ b/local.go
@@ -252,6 +252,18 @@ func (a *LocalConn) Upload(bucket string, key string, path string) error {
return err
}
+// Deletes a list of objects
+func (a *LocalConn) DeleteObjects(bucket string, keys []string) error {
+ for _, v := range keys {
+ p := filepath.Join(a.TempDir, bucket, v)
+ err := os.Remove(p)
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
func (a *LocalConn) GetLogger() *log.Logger {
return a.Logger
}