sshmitm.clients.sftp module
- class sshmitm.clients.sftp.SFTPClient(host: str, port: int, method: AuthenticationMethod, password: Optional[str], user: str, key: Optional[PKey], session: Session)
Bases:
SSHClient
- chmod(path: Union[str, bytes], mode: int) int
- chown(path: Union[str, bytes], uid: int, gid: int) int
- close() int
- connect() bool
- classmethod from_client(ssh_client: Optional[SSHClient]) Optional[SFTPClient]
- get(remotePath: Union[str, bytes], localPath: Union[str, bytes], callback: Optional[Callable[[int, int], Any]] = None) int
- listdir_attr(path: str = '.') Union[int, List[SFTPAttributes]]
- lstat(path: Union[str, bytes]) Union[int, SFTPAttributes]
- mkdir(path: Union[str, bytes], mode: int = 511) int
- open(filename: Union[str, bytes], mode: str = 'r', bufsize: int = -1) SFTPFile
- put(localPath: Union[str, bytes], remotePath: Union[str, bytes], callback: Optional[Any] = None, confirm: bool = True) None
- readlink(path: Union[str, bytes]) Union[int, str]
- remove(path: Union[str, bytes]) int
- rename(oldpath: Union[str, bytes], newpath: Union[str, bytes]) int
- rmdir(path: Union[str, bytes]) int
- property running: bool
- stat(path: Union[str, bytes]) Union[int, SFTPAttributes]
- symlink(source: Union[str, bytes], dest: Union[str, bytes]) int
- utime(path: Union[str, bytes], times: Tuple[float, float]) int