os: add os.(*File).Sync

Signed-off-by: Achille Roussel <achille.roussel@gmail.com>
This commit is contained in:
Achille Roussel
2023-05-01 11:07:29 -07:00
committed by Ron Evans
parent 4fa6a132e2
commit ccfe92a58c
8 changed files with 27 additions and 15 deletions
+3
View File
@@ -52,6 +52,9 @@ type FileHandle interface {
// Seek resets the file pointer relative to start, current position, or end
Seek(offset int64, whence int) (newoffset int64, err error)
// Sync blocks until buffered writes have been written to persistent storage
Sync() (err error)
// Write writes up to len(b) bytes to the file.
Write(b []byte) (n int, err error)