2023-06-20 21:44:50 +00:00
|
|
|
package stackops
|
|
|
|
|
|
|
|
import (
|
|
|
|
basetypes "code.apps.glenux.net/glenux/kiwimix/pkg/basetypes"
|
|
|
|
)
|
|
|
|
|
|
|
|
type LoadOperation struct{}
|
|
|
|
|
2023-08-06 10:52:27 +00:00
|
|
|
func (op *LoadOperation) Execute(stack *basetypes.Stack, filePath string) error {
|
|
|
|
cal, err := basetypes.ParseCalendarFile(filePath) // hypothetically, ParseICSFile parses an ICS file into a Calendar object
|
2023-06-20 21:44:50 +00:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
stack.Push(cal)
|
|
|
|
return nil
|
|
|
|
}
|