mirror of
https://git.sr.ht/~sircmpwn/tokidoki
synced 2025-12-12 14:17:21 +01:00
storage/filesystem: implement DeleteCalendarObject
This commit is contained in:
parent
9425b8cc81
commit
196503553a
1 changed files with 14 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue