%PDF- %PDF-
Direktori : /lib/python3/dist-packages/paramiko/__pycache__/ |
Current File : //lib/python3/dist-packages/paramiko/__pycache__/sftp_client.cpython-312.pyc |
� �ecJ� � �x � d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlm Z d dl mZ d dlm Z d dlmZmZmZ d dlmZmZmZ d dlmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5 d d l6m7Z7 d d l8m9Z9 d dl:m;Z; d dl<m=Z= d � Z>dZ? G d� dee=� Z@ G d� de@� ZAy)� )�hexlifyN)�util)�Channel)�Message)�INFO�DEBUG�o777)�b�u�long)�BaseSFTP�CMD_OPENDIR� CMD_HANDLE� SFTPError�CMD_READDIR�CMD_NAME� CMD_CLOSE�SFTP_FLAG_READ�SFTP_FLAG_WRITE�SFTP_FLAG_CREATE�SFTP_FLAG_TRUNC�SFTP_FLAG_APPEND�SFTP_FLAG_EXCL�CMD_OPEN� CMD_REMOVE� CMD_RENAME� CMD_MKDIR� CMD_RMDIR�CMD_STAT� CMD_ATTRS� CMD_LSTAT�CMD_SYMLINK�CMD_SETSTAT�CMD_READLINK�CMD_REALPATH� CMD_STATUS�CMD_EXTENDED�SFTP_OK�SFTP_EOF�SFTP_NO_SUCH_FILE�SFTP_PERMISSION_DENIED)�SFTPAttributes)�SSHException)�SFTPFile)�ClosingContextManagerc � � | j d� S # t t f$ r( | j d� cY S # t $ r | cY cY S w xY ww xY w)z� decode a string as ascii or utf8 if possible (as required by the sftp protocol). if neither works, just return a byte string because the server probably doesn't know the filename's encoding. �asciizutf-8)�encode�UnicodeError�AttributeError�decode)�ss �6/usr/lib/python3/dist-packages/paramiko/sftp_client.py�_to_unicoder8 H sR � ���x�x�� � ���.�)� � ��8�8�G�$�$��� ��H� ���s) � �A �6�A �A�A �A�A � /c � � � e Zd ZdZd� Zed&d�� Z� fd�Zd� Zd� Z d'd�Z d'd�Zd(d �Zd)d �Z e Zd� ZeZd� Zd � Zefd�Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd*d�Zd� Z d� Z!d+d�Z"d,d�Z#d,d�Z$d,d�Z%d � Z&d!� Z'd*d"�Z(d#� Z)d$� Z*d%� Z+� xZ,S )-� SFTPClientz� SFTP client object. Used to open an SFTP session across an open SSH `.Transport` and perform remote file operations. Instances of this class may be used as context managers. c �< � t j | � || _ d| _ d| _ t j � | _ d| _ t j � | _ t |� t u rZ| j j � }t j |j# � dz � | _ |j'