code: func IsIndexFileExists(files []string) bool {
  	// Defensive: maybe a Directory impl returns null
  	// instead of throwing NoSuchDirectoryException:
  	if files != nil {
  		prefix := INDEX_FILENAME_SEGMENTS + "_"
  		for _, file := range files {
  			if strings.HasPrefix(file, prefix) || file == INDEX_FILENAME_SEGMENTS_GEN {
  				return true
  			}
  		}
  	}
  	return false
  }
docs: /* No lock is required */