%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/
Upload File :
Create Path :
Current File : //proc/self/root/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_attr.pyc

�
��Abc@spddlZddlZddlmZmZmZmZddlmZm	Z	m
Z
defd��YZdS(i����N(t	x80000000to700to70t	xffffffff(tlongtPY2tstrftimetSFTPAttributescBs�eZdZdZdZdZdZeZd�Z	e
dd��Zd�Z
e
ddd��Zd	�Zd
�Zd�Zeed��Zd
�Zd�Zer�eZeZneZRS(sh
    Representation of the attributes of a file (or proxied file) for SFTP in
    client or server mode.  It attemps to mirror the object returned by
    `os.stat` as closely as possible, so it may have the following fields,
    with the same meanings as those returned by an `os.stat` object:

        - ``st_size``
        - ``st_uid``
        - ``st_gid``
        - ``st_mode``
        - ``st_atime``
        - ``st_mtime``

    Because SFTP allows flags to have other arbitrary named attributes, these
    are stored in a dict named ``attr``.  Occasionally, the filename is also
    stored, in ``filename``.
    iiiicCsLd|_d|_d|_d|_d|_d|_d|_i|_dS(sX
        Create a new (empty) SFTPAttributes object.  All fields will be empty.
        iN(	t_flagstNonetst_sizetst_uidtst_gidtst_modetst_atimetst_mtimetattr(tself((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_attr.pyt__init__2s							cCsm|�}|j|_|j|_|j|_|j|_|j|_|j|_|dk	ri||_n|S(s`
        Create an `.SFTPAttributes` object from an existing ``stat`` object (an
        object returned by `os.stat`).

        :param object obj: an object returned by `os.stat` (or equivalent).
        :param str filename: the filename associated with this file.
        :return: new `.SFTPAttributes` object with the same attribute fields.
        N(R
RRR
RRR	tfilename(tclstobjRR((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_attr.pyt	from_stat?s
	cCsdj|j��S(Ns<SFTPAttributes: {}>(tformatt
_debug_str(R((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_attr.pyt__repr__TscCsJ|�}|j|�|dk	r.||_n|dk	rF||_n|S(N(t_unpackR	Rtlongname(RtmsgRRR((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_attr.pyt	_from_msgXs	
cCs|j�|_|j|j@r1|j�|_n|j|j@rb|j�|_|j�|_n|j|j@r�|j�|_	n|j|j
@r�|j�|_|j�|_n|j|j
@r|j�}x0t|�D]}|j�|j|j�<q�WndS(N(tget_intRt	FLAG_SIZEt	get_int64R
tFLAG_UIDGIDRRtFLAG_PERMISSIONSR
tFLAG_AMTIMERRt
FLAG_EXTENDEDtranget
get_stringR(RRtcountti((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_attr.pyRbscCsd|_|jdk	r-|j|jO_n|jdk	r`|jdk	r`|j|jO_n|jdk	r�|j|jO_n|j	dk	r�|j
dk	r�|j|jO_nt|j
�dkr�|j|jO_n|j|j�|j|j@r|j|j�n|j|j@rG|j|j�|j|j�n|j|j@rj|j|j�n|j|j@r�|jt|j	��|jt|j
��n|j|j@r|jt|j
��x:|j
j�D]&\}}|j|�|j|�q�WndS(Ni(RR
R	RRRR!R
R"RRR#tlenRR$tadd_intt	add_int64Rtitemst
add_string(RRtkeytval((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_attr.pyt_packss8	
cCsd}|jdk	r.|dj|j�7}n|jdk	rk|jdk	rk|dj|j|j�7}n|jdk	r�|dt|j�d7}n|jdk	r�|jdk	r�|dj|j|j�7}nx9|j	j
�D](\}}|djt|�|�7}q�W|d7}|S(	Ns[ ssize={} suid={} gid={} smode=t satime={} mtime={} s
"{}"={!r} t](R
R	RRRR
toctRRRR,tstr(Rtouttktv((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_attr.pyR�s 
cCsf|rd}nd|d?d|d?d@}|rL|d||d@7}n|d||d@7}|S(Nis-rs-wis-xTts-xSs((tntsuidtstickyR5((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_attr.pyt_rwx�s	c	CsW|jdk	rRtj|j�}|tjkr9d}n�|tjkrQd}n~|tjkrid}nf|tjkr�d}nN|tjkr�d}n6|tj	kr�d}n|tj
kr�d}nd}||j|jt@d	?|jtj
@�7}||j|jt@d
?|jtj@�7}||j|jd@|jtj@t�7}nd}|jdksv|jtkrd
}nRtj|j�}ttj�|j�dkr�td|�}ntd|�}t|dd�}|j}|j}|j}|dkrd}n|dkr(d}n|dkr=d}nd||||||fS(s=create a unix-style long description of the file (like ls -l)tptctdtbt-tltst?iiis
?---------s(unknown date)iN�s%d %b %Ys%d %b %H:%MRis%s   1 %-8d %-8d %8d %-12s %sN(R
R	tstattS_IFMTtS_IFIFOtS_IFCHRtS_IFDIRtS_IFBLKtS_IFREGtS_IFLNKtS_IFSOCKR;RtS_ISUIDRtS_ISGIDtS_ISVTXtTrueRRttimet	localtimetabsRtgetattrRRR
(	Rtkindtkstdatestrt
time_tupleRtuidtgidtsize((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_attr.pyt_as_text�s^								"	"	$							cCs|j�jd�S(Nsutf-8(R\tencode(R((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_attr.pytasbytes�sN(t__name__t
__module__t__doc__RR!R"R#RR$RtclassmethodR	RRRRR0RtstaticmethodtFalseR;R\R^Rt__unicode__t__str__(((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_attr.pyRs.	
					
	C		(
RDRQtparamiko.commonRRRRtparamiko.py3compatRRRtobjectR(((sG/opt/plesk/python/2.7/lib/python2.7/site-packages/paramiko/sftp_attr.pyt<module>s"

Zerion Mini Shell 1.0