Syncs a directory from host to guest and vice-versa. It creates a directory in the guest's home directory and copies the contents of the host's current working directory into it. The guest directory paths should be prefixed with ` :` followed by the path.
(ctx context.Context, cmd *cobra.Command, rsync copytool.CopyTool, paths []string)
| 703 | // Syncs a directory from host to guest and vice-versa. It creates a directory in the guest's home directory and copies the contents of the host's |
| 704 | // current working directory into it. The guest directory paths should be prefixed with `<InstanceName>:` followed by the path. |
| 705 | func rsyncDirectory(ctx context.Context, cmd *cobra.Command, rsync copytool.CopyTool, paths []string) error { |
| 706 | rsyncCmd, err := rsync.Command(ctx, paths, nil) |
| 707 | if err != nil { |
| 708 | return err |
| 709 | } |
| 710 | rsyncCmd.Stdout = cmd.OutOrStdout() |
| 711 | rsyncCmd.Stderr = cmd.OutOrStderr() |
| 712 | logrus.Debugf("executing rsync: %+v", rsyncCmd.Args) |
| 713 | return rsyncCmd.Run() |
| 714 | } |
| 715 | |
| 716 | func mountDirFromWindowsDir(ctx context.Context, inst *limatype.Instance, dir string) (string, error) { |
| 717 | if inst.VMType == limatype.WSL2 { |
no test coverage detected