storage/filesystem: implement DeleteCalendarObject

This commit is contained in:
Conrad Hoffmann 2022-10-28 12:20:22 +02:00
parent 9425b8cc81
commit 196503553a

View File

@ -627,3 +627,17 @@ func (b *filesystemBackend) PutCalendarObject(ctx context.Context, objPath strin
return objPath, nil
}
func (b *filesystemBackend) DeleteCalendarObject(ctx context.Context, path string) error {
debug.Printf("filesystem.DeleteCalendarObject(%s)", path)
localPath, err := b.localCalDAVPath(ctx, path)
if err != nil {
return err
}
err = os.Remove(localPath)
if err != nil {
return err
}
return nil
}