github.com/coocood/badger@v1.5.1-0.20200528065104-c02ac3616d04/fileutil/sync.go (about) 1 // +build !linux,!darwin 2 3 package fileutil 4 5 import "os" 6 7 // Fsync is a wrapper around file.Sync(). Special handling is needed on darwin platform. 8 func Fsync(f *os.File) error { 9 return f.Sync() 10 } 11 12 // Fdatasync is a wrapper around file.Sync(). Special handling is needed on linux platform. 13 func Fdatasync(f *os.File) error { 14 return f.Sync() 15 }