You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
280 B
14 lines
280 B
//go:build linux
|
|
|
|
package batchio
|
|
|
|
import (
|
|
"os"
|
|
"syscall"
|
|
)
|
|
|
|
// fdatasync flushes file data to disk without updating metadata (mtime, size).
|
|
// On Linux, this uses the fdatasync(2) syscall directly.
|
|
func fdatasync(fd *os.File) error {
|
|
return syscall.Fdatasync(int(fd.Fd()))
|
|
}
|