func (list *RecordingsList) Save() *[]error {
	var err error
	var errs []error
	var f *os.File
	f, err = os.OpenFile(list.Path, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0755)
	if err != nil {
		errs = append(errs, err)
		return &errs
	}

	var wr *csv.Writer = csv.NewWriter(f)
	var rc []string = make([]string, len(list.FieldOrder))
	var rcd Recording
	for _, rcd = range list.Recordings {
		rc[list.FieldOrder[0]] = formatBool(&rcd.Enabled)
		rc[list.FieldOrder[1]] = rcd.Stream.String()
		rc[list.FieldOrder[2]] = rcd.Start.Format(list.TimeFormat)
		rc[list.FieldOrder[3]] = rcd.End.Format(list.TimeFormat)

		err = wr.Write(rc)
		if err != nil {
			errs = append(errs, err)
		}
		err = wr.Error()
		if err != nil {
			errs = append(errs, err)
		}
	}

	wr.Flush()
	//f.Close()
	return &errs
}
// Writes a file with the specified recordings
// Ignores fields that are not specified in the FieldOrder
Writes a file with the specified recordings
Ignores fields that are not specified in the FieldOrder
// Writes a file with the specified recordings // Ignores fields that are not specified in the FieldOrder
func (list *RecordingsList) Save() *[]error {
	var err error
	var errs []error
	var f *os.File
	f, err = os.OpenFile(list.Path, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0755)
	if err != nil {
		errs = append(errs, err)
		return &errs
	}
	var wr *csv.Writer = csv.NewWriter(f)
	var rc []string = make([]string, len(list.FieldOrder))
	var rcd Recording
	for _, rcd = range list.Recordings {
		rc[list.FieldOrder[0]] = formatBool(&rcd.Enabled)
		rc[list.FieldOrder[1]] = rcd.Stream.String()
		rc[list.FieldOrder[2]] = rcd.Start.Format(list.TimeFormat)
		rc[list.FieldOrder[3]] = rcd.End.Format(list.TimeFormat)
		err = wr.Write(rc)
		if err != nil {
			errs = append(errs, err)
		}
		err = wr.Error()
		if err != nil {
			errs = append(errs, err)
		}
	}
	wr.Flush()
	return &errs
}
func ( list * RecordingsList ) Save ( ) * [ ] error { var err error var errs [ ] error var f * os . File f , err = os . OpenFile ( list . Path , os . O_RDWR | os . O_CREATE | os . O_TRUNC , 0755 ) if err != nil { errs = append ( errs , err ) return & errs } var wr * csv . Writer = csv . NewWriter ( f ) var rc [ ] string = make ( [ ] string , len ( list . FieldOrder ) ) var rcd Recording for _ , rcd = range list . Recordings { rc [ list . FieldOrder [ 0 ] ] = formatBool ( & rcd . Enabled ) rc [ list . FieldOrder [ 1 ] ] = rcd . Stream . String ( ) rc [ list . FieldOrder [ 2 ] ] = rcd . Start . Format ( list . TimeFormat ) rc [ list . FieldOrder [ 3 ] ] = rcd . End . Format ( list . TimeFormat ) err = wr . Write ( rc ) if err != nil { errs = append ( errs , err ) } err = wr . Error ( ) if err != nil { errs = append ( errs , err ) } } wr . Flush ( ) return & errs }
Writes a file with the specified recordings
Ignores fields that are not specified in the FieldOrder
Writes a file with the specified recordings Ignores fields that are not specified in the FieldOrder
//f.Close()