Files
sqlite3/internal/vfs/vfs_os_other.go
Nuno Cruces 9c07e57252 Refactor.
2023-03-29 15:06:22 +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)
}