Documentation
¶
Index ¶
- func CopyLocal(src, dst string) error
- func CopyRemote(sshClient *ssh.Client, src, dst string) error
- func ReadLocalFileBytes(filename string) ([]byte, error)
- func ReadRemoteFileBytes(sshClient *ssh.Client, remotePath string) ([]byte, error)
- func RunLocalCommand(command, username string) (string, string, error)
- func RunRemoteCommand(client *ssh.Client, command, username string) (string, string, error)
- func SetLocalFileMode(path, modeStr string) error
- func SetRemoteFileMode(sshClient *ssh.Client, path, modeStr string) error
- func StatLocal(path string, follow bool) (os.FileInfo, error)
- func StatRemote(sshClient *ssh.Client, path string) (os.FileInfo, error)
- func WriteLocalFile(filename string, data string) error
- func WriteRemoteFile(sshClient *ssh.Client, remotePath, data string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyRemote ¶
CopyRemote copies a file or directory recursively on the remote host using SFTP.
func ReadLocalFileBytes ¶
func ReadRemoteFileBytes ¶
ReadRemoteFileBytes reads the content of a remote file as raw bytes using SFTP.
func RunRemoteCommand ¶
RunRemoteCommand executes a command on a remote host using an existing SSH client connection.
func SetLocalFileMode ¶
func SetRemoteFileMode ¶
SetRemoteFileMode sets the mode of a remote file using SFTP.
func StatLocal ¶
StatLocal retrieves local file information. If follow is true, it follows symlinks (os.Stat). If follow is false, it stats the link itself (os.Lstat).
func StatRemote ¶
StatRemote retrieves remote file information using SFTP Lstat (does not follow symlinks). TODO: Implement follow=true for remote if needed (e.g., sftpClient.Stat or ReadLink+Stat)
func WriteLocalFile ¶
Types ¶
This section is empty.