mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-15 16:33:40 +00:00
os: add os.(*File).Sync
Signed-off-by: Achille Roussel <achille.roussel@gmail.com>
This commit is contained in:
committed by
Ron Evans
parent
4fa6a132e2
commit
ccfe92a58c
@@ -130,6 +130,11 @@ func (f unixFileHandle) Seek(offset int64, whence int) (int64, error) {
|
||||
return newoffset, handleSyscallError(err)
|
||||
}
|
||||
|
||||
func (f unixFileHandle) Sync() error {
|
||||
err := syscall.Fsync(syscallFd(f))
|
||||
return handleSyscallError(err)
|
||||
}
|
||||
|
||||
type unixDirent struct {
|
||||
parent string
|
||||
name string
|
||||
|
||||
Reference in New Issue
Block a user