Adds Sync to platform.File (#1426)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
@@ -187,6 +187,15 @@ func (r *lazyDir) Chown(uid, gid int) syscall.Errno {
|
||||
}
|
||||
}
|
||||
|
||||
// Sync implements the same method as documented on platform.File
|
||||
func (r *lazyDir) Sync() syscall.Errno {
|
||||
if f, ok := r.file(); !ok {
|
||||
return syscall.EBADF
|
||||
} else {
|
||||
return f.Sync()
|
||||
}
|
||||
}
|
||||
|
||||
// File implements the same method as documented on platform.File
|
||||
func (r *lazyDir) File() fs.File {
|
||||
if f, ok := r.file(); !ok {
|
||||
|
||||
Reference in New Issue
Block a user