code: func (l *WAL) Remove(files []string) error {
  	l.mu.Lock()
  	defer l.mu.Unlock()
  	for _, fn := range files {
  		l.traceLogger.Info("Removing WAL file", zap.String("path", fn))
  		os.RemoveAll(fn)
  	}
  
  	// Refresh the on-disk size stats
  	segments, err := segmentFileNames(l.path)
  	if err != nil {
  		return err
  	}
  	l.tracker.SetSegments(uint64(len(segments)))
  
  	var totalOldDiskSize int64
  	for _, seg := range segments {
  		stat, err := os.Stat(seg)
  		if err != nil {
  			return err
  		}
  
  		totalOldDiskSize += stat.Size()
  	}
  	l.tracker.SetOldSegmentSize(uint64(totalOldDiskSize))
  	return nil
  }
docs: // Remove deletes the given segment file paths from disk and cleans up any associated objects.