MCPcopy
hub / github.com/lima-vm/lima / CopyTool

Interface CopyTool

pkg/copytool/copytool.go:46–53  ·  view source on GitHub ↗

CopyTool is the interface for copy tool implementations.

Source from the content-addressed store, hash-verified

44
45// CopyTool is the interface for copy tool implementations.
46type CopyTool interface {
47 // Name returns the name of the copy tool.
48 Name() string
49 // Command builds and returns the exec.Cmd for the copy operation. If opts is set, it is used for this invocation instead of the tool's Options set during initialization, without modifying the stored Options.
50 Command(ctx context.Context, paths []string, opts *Options) (*exec.Cmd, error)
51 // IsAvailableOnGuest checks if the tool is available on the specified guest instance.
52 IsAvailableOnGuest(ctx context.Context, paths []string) bool
53}
54
55// New creates a new CopyTool based on the specified backend.
56func New(ctx context.Context, backend string, paths []string, opts *Options) (CopyTool, error) {

Callers 14

discoverDriversInDirFunction · 0.65
TestValidIdentifiersFunction · 0.65
TestDownloadRemoteFunction · 0.65
TestDownloadLocalFunction · 0.65
TestDownloadCompressedFunction · 0.65
CacheEntriesFunction · 0.65
WriteFunction · 0.65
OpenEditorFunction · 0.65
copyActionFunction · 0.65
rsyncDirectoryFunction · 0.65

Implementers 2

scpToolpkg/copytool/scp.go
rsyncToolpkg/copytool/rsync.go

Calls

no outgoing calls

Tested by

no test coverage detected