func (h *fshandler) Sync(sessionID [16]byte, request *xrdsync.Request) (xrdproto.Marshaler, xrdproto.ResponseStatus) {
	file := h.getFile(sessionID, request.Handle)
	if file == nil {
		return xrdproto.ServerError{
			Code:    xrdproto.InvalidRequest,
			Message: fmt.Sprintf("Invalid file handle: %v", request.Handle),
		}, xrdproto.Error
	}

	if err := file.Sync(); err != nil {
		return xrdproto.ServerError{
			Code:    xrdproto.IOError,
			Message: fmt.Sprintf("An IO error occurred: %v", err),
		}, xrdproto.Error
	}

	return nil, xrdproto.Ok
}
// Sync implements server.Handler.Sync.
Sync implements server.Handler.Sync.
// Sync implements server . Handler . Sync .
func (h *fshandler) Sync(sessionID [16]byte, request *xrdsync.Request) (xrdproto.Marshaler, xrdproto.ResponseStatus) {
	file := h.getFile(sessionID, request.Handle)
	if file == nil {
		return xrdproto.ServerError{
			Code:    xrdproto.InvalidRequest,
			Message: fmt.Sprintf("Invalid file handle: %v", request.Handle),
		}, xrdproto.Error
	}
	if err := file.Sync(); err != nil {
		return xrdproto.ServerError{
			Code:    xrdproto.IOError,
			Message: fmt.Sprintf("An IO error occurred: %v", err),
		}, xrdproto.Error
	}
	return nil, xrdproto.Ok
}
func ( h * fshandler ) Sync ( sessionID [ 16 ] byte , request * xrdsync . Request ) ( xrdproto . Marshaler , xrdproto . ResponseStatus ) { file := h . getFile ( sessionID , request . Handle ) if file == nil { return xrdproto . ServerError { Code : xrdproto . InvalidRequest , Message : fmt . Sprintf ( " " , request . Handle ) , } , xrdproto . Error } if err := file . Sync ( ) ; err != nil { return xrdproto . ServerError { Code : xrdproto . IOError , Message : fmt . Sprintf ( " " , err ) , } , xrdproto . Error } return nil , xrdproto . Ok }
Sync implements server.Handler.Sync.
Sync implements server . Handler . Sync .