+
    7&Ïj "  ã                   óö   € ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHtHt ^ RIt^RI	H
t
 ^RIHt ]P                  ! R4      tR]P                  R]P                   R]P"                  /tR	 t ! R
 R]
4      tR tR tR# )é    N)ÚS_ISDIRÚS_ISLNK)ÚAbstractFileSystem©Úinfer_storage_optionszfsspec.sftpÚauto_addÚrejectÚwarningc           	     ó  € V f   \         P                  ! 4       # \        V \        4      '       d    \        V ,          ! 4       # \        V \        4      '       d(   \        V \         P                  4      '       d   V ! 4       # \        V \         P                  4      '       d   V # \        R\        \        4       R\        V 4      P                   24      h  \
         d#    \        RT : R\        \        4       R24      Rhi ; i)zDTurn a ``host_key_policy`` argument into a paramiko policy instance.NzUnknown host_key_policy z; expected one of z# or a paramiko.MissingHostKeyPolicyzhost_key_policy must be one of z<, a paramiko.MissingHostKeyPolicy subclass or instance, not )ÚparamikoÚAutoAddPolicyÚ
isinstanceÚstrÚHOST_KEY_POLICIESÚKeyErrorÚ
ValueErrorÚsortedÚtypeÚ
issubclassÚMissingHostKeyPolicyÚ	TypeErrorÚ__name__)Úpolicys   &ÚU/opt/data/cache/scratch/pip-target-elquwxdg/lib/python/fsspec/implementations/sftp.pyÚ_resolve_host_key_policyr      sî   € à‚~Ü×%Ò%Ó'Ð'Ü�&œ#×Òð	Ü$ VÖ,Ó.Ð.ô �&œ$×Ò¤J¨v´x×7TÑ7T×$UÒ$UÙ‹xˆÜ�&œ(×7Ñ7×8Ò8ØˆÜ
Ø)ÜÔ#Ó$Ð
%ð &Ü  ›L×1Ñ1Ð2ð	4óð øô ô 	ÜØ*¨6©*Ð4FÜÔ+Ó,Ð-Ð-PðRóð ðð	ús   ±C Ã-D c                   óÐ   a a€ ] tR t^/t oRtRtV 3R ltR t]R 4       t	]
R 4       tRR ltRR ltR tR	 tR
 tR t]
RR l4       tRR ltRR ltR tRR ltR tR tRtVtV ;t# )ÚSFTPFileSystemzèFiles over SFTP/SSH

Peer-to-peer filesystem over SSH using paramiko.

Note: if using this with the ``open`` or ``open_files``, with full URLs,
there is no way to tell if a path is relative, so all paths are assumed
to be absolute.
c                óö   <€ V P                   '       d   R# \        SV `  ! R/ VB  VP                  RR4      V n        \        VP                  RR4      4      V n        Wn        W n        V P                  4        R# )aŒ  

Parameters
----------
host: str
    Hostname or IP as a string
temppath: str
    Location on the server to put files, when within a transaction
host_key_policy: str or paramiko.MissingHostKeyPolicy, optional
    Policy applied when the server presents a host key that is not
    known yet, passed to
    ``paramiko.SSHClient.set_missing_host_key_policy``. Either one of
    the strings ``"auto_add"`` (default, ``paramiko.AutoAddPolicy``:
    accept and remember any unknown key), ``"warning"``
    (``paramiko.WarningPolicy``: log a warning and accept) or
    ``"reject"`` (``paramiko.RejectPolicy``: refuse to connect), or a
    ``paramiko.MissingHostKeyPolicy`` subclass or instance.

    The default, ``"auto_add"``, trusts any host key presented on the
    first connection to a host, so a man-in-the-middle attacker can
    impersonate the server. Pass ``"reject"`` to only connect to hosts
    whose keys are already in the known hosts of the process.
ssh_kwargs: dict
    Parameters passed on to connection. See details in
    https://docs.paramiko.org/en/3.3/api/client.html#paramiko.client.SSHClient.connect
    May include port, username, password...
NÚtemppathz/tmpÚhost_key_policy© )
Ú_cachedÚsuperÚ__init__Úpopr   r   r    ÚhostÚ
ssh_kwargsÚ_connect)Úselfr&   r'   Ú	__class__s   &&,€r   r$   ÚSFTPFileSystem.__init__;   sd   ø€ ð8 �<�<ˆ<ÙÜ‰ÒÑ&˜:Ò&Ø"Ÿ™ z°6Ó:ˆŒÜ7Ø�N‰NÐ,¨dÓ3ó 
ˆÔð Œ	Ø$ŒØ�‰Žó    c                ód  € \         P                  R V P                  4       \        P                  ! 4       V n        V P
                  P                  V P                  4       V P
                  P                  ! V P                  3/ V P                  B  V P
                  P                  4       V n        R# )zConnecting to SFTP server %sN)ÚloggerÚdebugr&   r   Ú	SSHClientÚclientÚset_missing_host_key_policyr    Úconnectr'   Ú	open_sftpÚftp©r)   s   &r   r(   ÚSFTPFileSystem._connectb   sp   € Ü�‰Ð3°T·Y±YÔ?Ü×(Ò(Ó*ˆŒØ�‰×/Ñ/°×0DÑ0DÔEØ�‰×Ò˜DŸI™IÑ9¨¯©Ò9Ø—;‘;×(Ñ(Ó*ˆŽr,   c                ó&   € \        V4      R ,          # )Úpathr   )Úclsr9   s   &&r   Ú_strip_protocolÚSFTPFileSystem._strip_protocoli   s   € ä$ TÓ*¨6Õ2Ð2r,   c                ód   € \        V 4      pVP                  R R4       VP                  RR4       V# )r9   NÚprotocol)r   r%   )ÚurlpathÚouts   & r   Ú_get_kwargs_from_urlsÚ$SFTPFileSystem._get_kwargs_from_urlsm   s-   € ä# GÓ,ˆØ�‰�˜ÔØ�‰�
˜DÔ!Øˆ
r,   c                ó
  € V P                  V4      p\        P                  R V4       V P                  V4      '       d   \	        RV 24      hV'       d   V P                  V4       R# V P                  P                  W4       R# )zCreating folder %súFile exists: N)r;   r.   r/   ÚexistsÚFileExistsErrorÚmakedirsr5   Úmkdir)r)   r9   Úcreate_parentsÚmodes   &&&&r   rH   ÚSFTPFileSystem.mkdirt   sa   € Ø×#Ñ# DÓ)ˆÜ�‰Ð)¨4Ô0Ø�;‰;�t×ÒÜ! M°$°Ð"8Ó9Ð9çØ�M‰M˜$Öà�H‰H�N‰N˜4Ö&r,   c                óV  € V P                  V4      '       d   V'       g   \        R V 24      hVP                  R4      pVR,          R8X  d   RMRpV FR  pV'       g   K  V'       d   V RV 2MTpV P                  V4      '       d   K7  V P                  P	                  WS4       KT  	  R# )rD   Ú/:Né   NÚ N)rE   rF   Úsplitr5   rH   )r)   r9   Úexist_okrJ   ÚpartsÚnew_pathÚparts   &&&&   r   rG   ÚSFTPFileSystem.makedirs   s…   € Ø�;‰;�t×Ò§XÜ! M°$°Ð"8Ó9Ð9à—
‘
˜3“ˆØ˜r�( cœ/‘3¨rˆãˆDß‰tß3;˜h˜Z q¨¨Ñ/À�Ø—{‘{ 8×,Ô,Ø—H‘H—N‘N 8Ö2ó	 r,   c                óŠ   € V P                  V4      p\        P                  R V4       V P                  P	                  V4       R# )zRemoving folder %sN)r;   r.   r/   r5   Úrmdir©r)   r9   s   &&r   rW   ÚSFTPFileSystem.rmdirŒ   s1   € Ø×#Ñ# DÓ)ˆÜ�‰Ð)¨4Ô0Ø�‰�‰�tÖr,   c                ó„   € V P                  V4      pV P                  V P                  P                  V4      4      pWR &   V# )Úname)r;   Ú_decode_statr5   Ústat)r)   r9   r]   s   && r   ÚinfoÚSFTPFileSystem.info‘   s;   € Ø×#Ñ# DÓ)ˆØ× Ñ  §¡§¡¨tÓ!4Ó5ˆØˆV‰Øˆr,   c                ój   € V P                  V4      pVP                  RR4      pVe   V# \        R4      h)z=Return the created timestamp of a file as a datetime.datetimeÚmtimeNz5Could not retrieve creation time (modification time).©r^   ÚgetÚRuntimeError©r)   r9   r^   ra   s   &&  r   ÚcreatedÚSFTPFileSystem.created—   s8   € ð �y‰y˜‹ˆØ—‘˜ $Ó'ˆØÒØˆLÜÐRÓSÐSr,   c                ój   € V P                  V4      pVP                  RR4      pVe   V# \        R4      h)z>Return the modified timestamp of a file as a datetime.datetimera   Nz%Could not retrieve modification time.rb   re   s   &&  r   ÚmodifiedÚSFTPFileSystem.modified    s6   € à�y‰y˜‹ˆØ—‘˜ $Ó'ˆØÒØˆLÜÐBÓCÐCr,   c                óP  € \        V P                  4      '       d   R pM \        V P                  4      '       d   RpMRpRRRV P                  RVRV P                  RV P
                  R	\        P                  P                  V P                  \        P                  P                  R
7      R\        P                  P                  V P                  \        P                  P                  R
7      /pV'       d0   RP                  VP                  R4      V P                  .4      VR&   V# )Ú	directoryÚlinkÚfiler[   rO   Úsizer   ÚuidÚgidÚtime)Útzra   rM   )r   Úst_moder   Úst_sizeÚst_uidÚst_gidÚdatetimeÚfromtimestampÚst_atimeÚtimezoneÚutcÚst_mtimeÚjoinÚrstripÚfilename)r]   Úparent_pathÚtr@   s   &&  r   r\   ÚSFTPFileSystem._decode_stat¨   sí   € ä�4—<‘<× Ò Ø‰AÜ�T—\‘\×"Ò"Ø‰AàˆAà�BØ�D—L‘LØ�AØ�4—;‘;Ø�4—;‘;Ø”H×%Ñ%×3Ñ3Ø—‘¤(×"3Ñ"3×"7Ñ"7ð 4ó ð ”X×&Ñ&×4Ñ4Ø—‘¤(×"3Ñ"3×"7Ñ"7ð 5ó ð
ˆ÷ ØŸ(™( K×$6Ñ$6°sÓ$;¸T¿]¹]Ð#KÓLˆC�‰KØˆ
r,   c                ó,  € V P                  V4      p\        P                  R V4       V P                  P	                  V4       Uu. uF  q0P                  W14      NK  	  ppV'       d   V# V Uu. uF  q3R,          NK  	  pp\        V4      # u upi u upi )zListing folder %sr[   )r;   r.   r/   r5   Úlistdir_iterr\   r   )r)   r9   Údetailr]   ÚstatsÚpathss   &&&   r   ÚlsÚSFTPFileSystem.lsÁ   s…   € Ø×#Ñ# DÓ)ˆÜ�‰Ð(¨$Ô/Ø;?¿8¹8×;PÑ;PÐQUÔ;VÓWÑ;V°4×"Ñ" 4Ö.Ñ;VˆÐWßØˆLá.3Ó4©e d˜&—\�\©eˆEÐ4Ü˜%“=Ð ùò Xùò 5s   ÁBÁ.Bc                óÔ   € V P                  V P                  \        P                  ! V4      4      R R7       \        P                  RW4       V P                  P                  W4       R# )T©rQ   zPut file %s into %sN)ÚmkdirsÚ_parentÚosÚfspathr.   r/   r5   Úput)r)   ÚlpathÚrpathÚcallbackÚkwargss   &&&&,r   Úput_fileÚSFTPFileSystem.put_fileË   sC   € Ø�‰�D—L‘L¤§¢¨5Ó!1Ó2¸TˆÔBÜ�‰Ð*¨EÔ9Ø�‰�‰�UÖ"r,   c                ó¾   € V P                  V4      '       d   \        P                  ! VR R7       R# V P                  P	                  V P                  V4      V4       R# )TrŒ   N)Úisdirr�   rG   r5   rc   r;   )r)   r“   r’   r•   s   &&&,r   Úget_fileÚSFTPFileSystem.get_fileÐ   s<   € Ø�:‰:�e×ÒÜ�KŠK˜¨×-à�H‰H�L‰L˜×-Ñ-¨eÓ4°eÖ<r,   c                ó  € \         P                  RV4       VP                  RR4      RJ dµ   RP                  V P                  \        \        P                  ! 4       4      .4      pV P                  P                  YRV'       d   TMRR7      pWVn        Wn
        Wn        \        P                  ! \        V4      Vn        \        P                  ! \         V4      Vn        V# V P                  P                  YV'       d   TMRR7      pV# )z�
block_size: int or None
    If 0, no buffering, if 1, line buffering, if >1, buffer that many
    bytes, if None use default from paramiko.
zOpening file %sÚ
autocommitTFrM   )Úbufsizeéÿÿÿÿ)r.   r/   rc   r~   r   r   ÚuuidÚuuid4r5   ÚopenÚ
targetpathÚfsÚtypesÚ
MethodTypeÚcommit_a_fileÚcommitÚdiscard_a_fileÚdiscard)r)   r9   rJ   Ú
block_sizer•   Úpath2Úfs   &&&&,  r   Ú_openÚSFTPFileSystem._openÖ   sÃ   € ô 	�‰Ð&¨Ô-Ø�:‰:�l DÓ)¨UÓ2à—H‘H˜dŸm™m¬S´·²³Ó->Ð?Ó@ˆEØ—‘—‘˜eÇ±:ÐQS�ÓTˆAØŒJØŒLØŒDÜ×'Ò'¬°qÓ9ˆAŒHÜ×(Ò(¬¸Ó;ˆAŒIð ˆð —‘—‘˜dÇ
±*ÐPR�ÓSˆAØˆr,   c                ó¤   € V P                  V4      '       d   V P                  P                  V4       R # V P                  P                  V4       R # ©N)r™   r5   rW   ÚremoverX   s   &&r   Ú_rmÚSFTPFileSystem._rmê   s1   € Ø�:‰:�d×ÒØ�H‰H�N‰N˜4Ö à�H‰H�O‰O˜DÖ!r,   c                ó¬   € V P                  V4      pV P                  V4      p\        P                  R W4       V P                  P	                  W4       R# )zRenaming %s into %sN)r;   r.   r/   r5   Úposix_rename)r)   ÚoldÚnews   &&&r   ÚmvÚSFTPFileSystem.mvð   sC   € Ø×"Ñ" 3Ó'ˆØ×"Ñ" 3Ó'ˆÜ�‰Ð*¨CÔ5Ø�‰×Ñ˜cÖ'r,   )r1   r5   r&   r    r'   r   )ÚsftpÚssh)Téÿ  )Fr½   r±   )F)ÚrbN)r   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r>   r$   r(   Úclassmethodr;   ÚstaticmethodrA   rH   rG   rW   r^   rf   ri   r\   r‰   r–   rš   r®   r³   r¹   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r*   Ú__classdict__s   @@r   r   r   /   s›   ù‡ € ñð €Hõ%òN+ð ñ3ó ð3ð ñó ðô	'ô3òò
òTòDð óó ðô0!ô#ò
=ôò("÷(ò (r,   r   c                 óf   € V P                   P                  V P                  V P                  4       R # r±   )r¤   r¹   r   r£   r6   s   &r   r§   r§   ÷   s   € Ø‡G�G‡J�Jˆt�}‰}˜dŸo™oÖ.r,   c                 óP   € V P                   P                  V P                  4       R # r±   )r¤   r³   r   r6   s   &r   r©   r©   û   s   € Ø‡G�G‡K�K�—‘Ör,   )rx   Úloggingr�   r¥   r    r]   r   r   r   rO   r   Úutilsr   Ú	getLoggerr.   r   ÚRejectPolicyÚWarningPolicyr   r   r   r§   r©   r!   r,   r   Ú<module>rÐ      sz   ðÛ Û Û 	Û Û ß !ã å !Ý )à	×	Ò	˜=Ó	)€ð
 �×&Ñ&Øˆh×#Ñ#Øˆx×%Ñ%ðÐ òô.E(Ð'ô E(òP/ôr,   