scf begin

This commit is contained in:
DarkGopher 2025-06-27 18:48:26 +02:00
parent efcfce5197
commit 6d0dd67a7d
2 changed files with 78 additions and 0 deletions

20
storage/hybrid/scf/scf.go Normal file
View file

@ -0,0 +1,20 @@
// 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
}