code: func FSSync(ctx context.Context, c session.Caller, opt FSSendRequestOpt) error {
  	var pr *protocol
  	for _, p := range supportedProtocols {
  		if isProtoSupported(p.name) && c.Supports(session.MethodURL(_FileSync_serviceDesc.ServiceName, p.name)) {
  			pr = &p
  			break
  		}
  	}
  	if pr == nil {
  		return errors.New("no local sources enabled")
  	}
  
  	opts := make(map[string][]string)
  	if opt.OverrideExcludes {
  		opts[keyOverrideExcludes] = []string{"true"}
  	}
  
  	if opt.IncludePatterns != nil {
  		opts[keyIncludePatterns] = opt.IncludePatterns
  	}
  
  	if opt.ExcludePatterns != nil {
  		opts[keyExcludePatterns] = opt.ExcludePatterns
  	}
  
  	if opt.FollowPaths != nil {
  		opts[keyFollowPaths] = opt.FollowPaths
  	}
  
  	opts[keyDirName] = []string{opt.Name}
  
  	ctx, cancel := context.WithCancel(ctx)
  	defer cancel()
  
  	client := NewFileSyncClient(c.Conn())
  
  	var stream grpc.ClientStream
  
  	ctx = metadata.NewOutgoingContext(ctx, opts)
  
  	switch pr.name {
  	case "tarstream":
  		cc, err := client.TarStream(ctx)
  		if err != nil {
  			return err
  		}
  		stream = cc
  	case "diffcopy":
  		cc, err := client.DiffCopy(ctx)
  		if err != nil {
  			return err
  		}
  		stream = cc
  	default:
  		panic(fmt.Sprintf("invalid protocol: %q", pr.name))
  	}
  
  	return pr.recvFn(stream, opt.DestDir, opt.CacheUpdater, opt.ProgressCb, opt.Filter)
  }
docs: // FSSync initializes a transfer of files