code: func (ms *FileMsgStore) Flush() error {
  	ms.Lock()
  	var err error
  	if ms.writeSlice != nil {
  		err = ms.lockFiles(ms.writeSlice)
  		if err == nil {
  			err = ms.flush(ms.writeSlice)
  			ms.unlockFiles(ms.writeSlice)
  		}
  	}
  	ms.Unlock()
  	return err
  }
docs: // Flush flushes outstanding data into the store.