ó õùPc@sFddlZddlZddlTddlTdefd„ƒYZdS(iÿÿÿÿN(t*tSFTPAttributescBs­eZdZdZdZdZdZdZd„Zdd„Z e e ƒZ d„Z ddd „Z e e ƒZ d „Zd „Zd „Zed „ZeeƒZd„ZRS(sO 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 C{os.stat} as closely as possible, so it may have the following fields, with the same meanings as those returned by an C{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 C{attr}. Occasionally, the filename is also stored, in C{filename}. iiiilcCsLd|_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((s-..\python\site-packages\paramiko\sftp_attr.pyt__init__1s       cCsm|ƒ}|j|_|j|_|j|_|j|_|j|_|j|_|dk ri||_n|S(s« Create an SFTPAttributes object from an existing C{stat} object (an object returned by C{os.stat}). @param obj: an object returned by C{os.stat} (or equivalent). @type obj: object @param filename: the filename associated with this file. @type filename: str @return: new L{SFTPAttributes} object with the same attribute fields. @rtype: L{SFTPAttributes} N(RRRRRR Rtfilename(tclstobjR R ((s-..\python\site-packages\paramiko\sftp_attr.pyt from_stat>s         cCsd|jƒS(Ns(t _debug_str(R ((s-..\python\site-packages\paramiko\sftp_attr.pyt__repr__VscCsJ|ƒ}|j|ƒ|dk r.||_n|dk rF||_n|S(N(t_unpackRR tlongname(RtmsgR RR ((s-..\python\site-packages\paramiko\sftp_attr.pyt _from_msg]s      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ƒRLtparamiko.commont paramiko.sftptobjectR(((s-..\python\site-packages\paramiko\sftp_attr.pyts