%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/
Upload File :
Create Path :
Current File : //opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyo

�
��Abc@�s�ddlmZddlmZddlmZddlZddlZddlZddl	m
Z
ddlmZddl
mZmZddlmZmZmZmZmZmZmZmZmZmZdd	lmZd
efd��YZdS(i����(twith_statement(thexlify(tdequeN(tDEBUG(tBufferedFile(tutlong(
t	CMD_CLOSEtCMD_READtCMD_DATAt	SFTPErrort	CMD_WRITEt
CMD_STATUSt	CMD_FSTATt	CMD_ATTRStCMD_FSETSTATtCMD_EXTENDED(tSFTPAttributestSFTPFilecB�s%eZdZddd�Zd�Zd�Zed�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zdd�Zd�Zd�Zd�Zd�Zd�Zdddd�Zed�Zd d�Zd�Zd�Zd�Zd�Zd�Z d�Z!RS(!i�tri����cC�s�tj|�||_||_tj|||�t|_t|_t|_i|_	i|_
tj�|_
d|_t�|_dS(N(Rt__init__tsftpthandlet	_set_modetFalset	pipelinedt_prefetchingt_prefetch_donet_prefetch_datat_prefetch_extentst	threadingtLockt_prefetch_locktNonet_saved_exceptionRt_reqs(tselfRRtmodetbufsize((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyR=s
								cC�s|jdt�dS(Ntasync_(t_closetTrue(R$((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyt__del__KscC�s|jdt�dS(NR'(R(R(R$((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pytcloseNscC�s�|jr
dS|jjtdjtt|j����|jrT|jj	|�nt
j|�yB|r�|jjt
d�t|j�n|jjt|j�Wn*tk
r�nttjfk
r�nXdS(Ns	close({})(t_closedRt_logRtformatRRRRt_finish_responsesRR+t_async_requestttypeR!Rt_requesttEOFErrortIOErrortsocketterror(R$R'((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyR(Ts	+	
"
cC�s�gt|jj��D]}|d|kr|^q}t|�dkrNtS|jdd��|d\}}|||kr�tS||||kr�tS|j||||||�S(NitkeycS�s|dS(Ni((tx((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyt<lambda>vti����(tlistRtvaluestlenRtsortR)t_data_in_prefetch_requests(R$toffsettsizeR8tkt
buf_offsettbuf_size((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyR?ps8cC�s{g|jj�D]}||kr|^q}t|�dkrDdSt|�}||}|t|j|�krwdS|S(Ni(RtkeysR=R!tmax(R$R@tiRBtindexRC((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyt_data_in_prefetch_buffers�s.
cC�s�xYtr[|j|j�}|dk	r+Pn|js=|jrAPn|jj�|j�qW|dkrut	|_
dS|j|}|j|=|j|}|dkr�|| |j|<||}n|t|�kr�|||j|j|<|| }n|S(Ni(
R)RIt_realposR!RR,Rt_read_responset_check_exceptionRRRR=(R$RAR@tprefetchRC((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyt_read_prefetch�s*	
	




cC�s�t||j�}|jr=|j|�}|dk	r=|Sn|jjt|jt	|j
�t|��\}}|tkr�t
d��n|j�S(Ns
Expected data(tmintMAX_REQUEST_SIZERRNR!RR2RRRRJtintR	R
t
get_string(R$RAtdatatttmsg((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyt_read�s		*cC�s�tt|�|j�}|jjtd�t|jt	|j
�|| �}|jj|�|j
s�t|j�dkr�|jjj�r�xXt|j�r�|jj�}|jj|�\}}|tkr�td��q�q�Wn|S(NidsExpected status(ROR=RPRR0R1R!RRRRJR#tappendRtsockt
recv_readytpopleftRKRR
(R$RStchunktsftp_async_requesttreqRTRU((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyt_write�s 		

'cC�s|jjj|�dS(N(RRXt
settimeout(R$ttimeout((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyR_�scC�s|jjj�S(N(RRXt
gettimeout(R$((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyRa�scC�s|jjj|�dS(N(RRXtsetblocking(R$tblocking((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyRb�s
cC�stS(N(R)(R$((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pytseekable�sicC�s�|j�||jkr,||_|_nG||jkrY|j|7_|j|_n|j�||_|_t�|_dS(N(tflushtSEEK_SETRJt_postSEEK_CURt	_get_sizetbytest_rbuffer(R$R@twhence((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pytseeks
cC�sF|jjt|j�\}}|tkr9td��ntj|�S(NsExpected attributes(RR2R
RRR
Rt	_from_msg(R$RTRU((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pytstats	cC�sW|jjtdjt|j�|��t�}||_|jjt	|j|�dS(Nschmod({}, {!r})(
RR-RR.RRRtst_modeR2R(R$R%tattr((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pytchmod s
			cC�sd|jjtdjt|j�||��t�}|||_|_|jj	t
|j|�dS(Nschown({}, {!r}, {!r})(RR-RR.RRRtst_uidtst_gidR2R(R$tuidtgidRq((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pytchown/s
		cC�s�|dkr'tj�tj�f}n|jjtdjt|j�|��t�}|\|_	|_
|jjt|j|�dS(Nsutime({}, {!r})(
R!ttimeRR-RR.RRRtst_atimetst_mtimeR2R(R$ttimesRq((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pytutimeAs
		cC�sW|jjtdjt|j�|��t�}||_|jjt	|j|�dS(Nstruncate({}, {!r})(
RR-RR.RRRtst_sizeR2R(R$RARq((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyttruncateWs
			cC�s]|jjtd|j|t|�t|�|�\}}|j�|j�|j�}|S(Ns
check-file(RR2RRRtget_textt
get_remainder(R$thash_algorithmR@tlengtht
block_sizeRTRURS((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pytcheckfs.			

cC�s
||_dS(N(R(R$R((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyt
set_pipelined�scC�s�|dkr|j�j}ng}|j}xC||krrt|j||�}|j||f�||7}q0Wt|�dkr�|j|�ndS(Ni(	R!RoR}RJRORPRWR=t_start_prefetch(R$t	file_sizetchunkstnR[((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyRM�s	cc�s�|jjtdjt|j�|��g}x�|D]\}}|j|�s5|j||�rhq5nxI|dkr�t||j	�}|j
||f�||7}||8}qkWq5W|j|�x1|D])}|j|d�|j
|d�Vq�WdS(Nsreadv({}, {!r})ii(RR-RR.RRRIR?RORPRWR�Rmtread(R$R�tread_chunksR@RAt
chunk_sizeR8((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pytreadv�s"		


cC�s y|j�jSWndSXdS(Ni(RoR}(R$((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyRiscC�sKt|_t|_tjd|jd|f�}|jt�|j�dS(Nttargettargs(	R)RRRRtThreadt_prefetch_threadt	setDaemontstart(R$R�RT((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyR�
s
		
cC�skxd|D]\\}}|jj|t|jt|�t|��}|j�||f|j|<WdQXqWdS(N(RR0RRRRQR R(R$R�R@R�tnum((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyR�s
	$
cC�s�|tkrCy|jj|�Wntk
r>}||_nXdS|tkr^td��n|j�}xxtr�|j	�c||j
kr�|j
|\}}||j|<|j
|=t|j
�dkr�t|_
nPnWdQXqmWdS(Ns
Expected datai(RRt_convert_statust	ExceptionR"R	R
RRR)R RRR=R(R$RTRUR�teRSR@R�((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyt_async_responses$
	


cC�s.|jdk	r*|j}d|_|�ndS(N(R"R!(R$R8((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyRL5s		N("t__name__t
__module__RPRR*R+RR(R?RIRNRVR^R_RaRbRdRmRoRrRwR|R~R�R)R�R!RMR�RiR�R�R�RL(((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyR1s:
						
		
				
					<(	)			
	(t
__future__RtbinasciiRtcollectionsRR5RRxtparamiko.commonRt
paramiko.fileRtparamiko.py3compatRRt
paramiko.sftpRRR	R
RRR
RRRtparamiko.sftp_attrRR(((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_file.pyt<module>sF

Zerion Mini Shell 1.0