Files
sqlite3/vfs/os_other.go
Nuno Cruces 7bf5312bd4 Rename.
2023-06-02 03:38:26 +01:00

24 lines
353 B
Go

//go:build !linux && (!darwin || sqlite3_bsd)
package vfs
import (
"io"
"os"
)
func osSync(file *os.File, fullsync, dataonly bool) error {
return file.Sync()
}
func osAllocate(file *os.File, size int64) error {
off, err := file.Seek(0, io.SeekEnd)
if err != nil {
return err
}
if size <= off {
return nil
}
return file.Truncate(size)
}