MCPcopy
hub / github.com/charmbracelet/wish / CopyToClientHandler

Interface CopyToClientHandler

scp/scp.go:19–38  ·  view source on GitHub ↗

CopyToClientHandler is a handler that can be implemented to handle files being copied from the server to the client.

Source from the content-addressed store, hash-verified

17// CopyToClientHandler is a handler that can be implemented to handle files
18// being copied from the server to the client.
19type CopyToClientHandler interface {
20 // Glob should be implemented if you want to provide server-side globbing
21 // support.
22 //
23 // A minimal implementation to disable it is to return `[]string{s}, nil`.
24 //
25 // Note: if your other functions expect a relative path, make sure that
26 // your Glob implementation returns relative paths as well.
27 Glob(ssh.Session, string) ([]string, error)
28
29 // WalkDir must be implemented if you want to allow recursive copies.
30 WalkDir(ssh.Session, string, fs.WalkDirFunc) error
31
32 // NewDirEntry should provide a *DirEntry for the given path.
33 NewDirEntry(ssh.Session, string) (*DirEntry, error)
34
35 // NewFileEntry should provide a *FileEntry for the given path.
36 // Users may also provide a closing function.
37 NewFileEntry(ssh.Session, string) (*FileEntry, func() error, error)
38}
39
40// CopyFromClientHandler is a handler that can be implemented to handle files
41// being copied from the client to the server.

Callers 9

GlobMethod · 0.65
copyToClientFunction · 0.65
GlobMethod · 0.65
chtimesTreeFunction · 0.65
WalkDirMethod · 0.65
copyToClientFunction · 0.65
WalkDirMethod · 0.65
copyToClientFunction · 0.65
copyToClientFunction · 0.65

Implementers 2

fileSystemHandlerscp/filesystem.go
fsHandlerscp/fs.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…