CopyToClientHandler is a handler that can be implemented to handle files being copied from the server to the client.
| 17 | // CopyToClientHandler is a handler that can be implemented to handle files |
| 18 | // being copied from the server to the client. |
| 19 | type 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. |
no outgoing calls
no test coverage detected
searching dependent graphs…