mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 05:59:14 +00:00
24 lines
383 B
Go
24 lines
383 B
Go
//go:build !linux && (!darwin || sqlite3_bsd)
|
|
|
|
package sqlite3
|
|
|
|
import (
|
|
"io"
|
|
"os"
|
|
)
|
|
|
|
func (vfsOSMethods) Sync(file *os.File, fullsync, dataonly bool) error {
|
|
return file.Sync()
|
|
}
|
|
|
|
func (vfsOSMethods) Allocate(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)
|
|
}
|