session/storage/hybrid/scf/scf.go
2025-06-27 18:48:26 +02:00

20 lines
405 B
Go

// Package scf provide Session Changes Log file
package scf
import (
"fmt"
"os"
)
type Scf struct {
fd *os.File
}
// NewScf open or create if not exists Session Changes Log file
func NewScf(fpath string) (scf *Scf, err error) {
var fd *os.File
if fd, err = os.Create(fpath); err != nil {
return nil, fmt.Errorf("can not open(create) SCF file: %s err: %v", fpath, err)
}
return &Scf{fd}, nil
}