+
    QV-j¥ì  ã                   ó  a € R. tW0 t ^ RIt^ RIt^ RIt^ RIHt ^ RIHtHt ^ RI	H
t
 ^ RIHt ^ RIHtHt ^ RIHt ^ RIHt ^ R	IHtHt ^ R
IHtHtHt ^ RIHtHt ^ RIt^ RIt^ RIH t H!t!H"t" ^ RI#H$t$ ^ RI%H&t& ^RI'H(t( ^RI)H*t*H+t+ ^RI,H-t-H.t.H/t/H0t0H1t1 ^RI2H3t3H4t4 ^RI5H6t6H7t7H8t8H9t9H:t:H;t;H<t< ^RI=H>t>H?t?H@t@HAtAHBtB ^RICHDtD ] ! R R4      4       tE] ! R R]E4      4       tF] ! R R]E4      4       tG]H! ]P’                  4      tJ] ^ k  ! R R]J4      tK ! R R]P’                  ]KR 7      tL ! R! R"]Pš                  Pœ                  4      tO ! R# R$]Pš                  Pœ                  4      tPR% R& ltQR' R( ltRR) R* ltSR+ R, ltTR- tU]L! 4       tVR# )/é    N)Údeque)ÚIterableÚIterator)Ú	ExitStack)Údeepcopy)Ú	dataclassÚfield)Údatetime)Úchain)ÚPathÚPurePosixPath)ÚAnyÚNoReturnÚUnion)ÚquoteÚunquote)Ú_DEFAULT_CALLBACKÚNoOpCallbackÚTqdmCallback)Úapply_config)Ú
isfilelike)Ú	constants)ÚCommitOperationCopyÚCommitOperationDelete)ÚBucketNotFoundErrorÚEntryNotFoundErrorÚHfHubHTTPErrorÚRepositoryNotFoundErrorÚRevisionNotFoundError)Ú
hf_hub_urlÚhttp_get)ÚSPECIAL_REFS_REVISION_REGEXÚ
BucketFileÚBucketFolderÚHfApiÚLastCommitInfoÚRepoFileÚ
RepoFolder)ÚHFValidationErrorÚhf_raise_for_statusÚhttp_backoffÚhttp_stream_backoffÚparse_hf_uri)Úmd5c                   óB   a € ] tR t^$t o RtV 3R lR ltV 3R ltRtV tR# )ÚHfFileSystemResolvedPathz_Top level Data structure containing information about a resolved Hugging Face file system path.c                ó    <€ V ^8„  d   QhRS[ /# ©é   Úreturn©Ústr)ÚformatÚ__classdict__s   "€Úo/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/huggingface_hub/hf_file_system.pyÚ__annotate__Ú%HfFileSystemResolvedPath.__annotate__+   s   ø€ ÷ 6ñ 6™3ñ 6ó    c                óV   € V P                    R V P                   2P                  R 4      # )Ú/)ÚrootÚpathÚrstrip©Úselfs   &r9   Ú	unresolveÚ"HfFileSystemResolvedPath.unresolve+   s&   € Ø—)‘)�˜A˜dŸi™i˜[Ð)×0Ñ0°Ó5Ð5r<   c                ó2   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   # )r3   r?   r@   r5   )r7   r8   s   "€r9   r:   r;   $   s   ø‡ ‚ ñ �Iñ	 ñ
 �Iò r<   © N)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rD   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__©r8   s   @r9   r0   r0   $   s   ø‡ € ái÷
6ð 6÷ ƒ r<   r0   c                   ón   a € ] tR t^/t o Rt]! RR7      t]! RR7      t]! RRR7      tR t	V 3R lt
RtV tR# )	Ú"HfFileSystemResolvedRepositoryPathzLData structure containing information about a resolved path in a repository.F©ÚinitN)ÚdefaultÚreprc                óz  € \         P                  P                  V P                  R 4      V P                  ,           pV P
                  '       d   V RV P
                   2V n        MEV P                  \         P                  8w  d!   V R\        V P                  4       2V n        MWn        V P                  V n        R# )Ú Ú@N)r   ÚREPO_TYPES_URL_PREFIXESÚgetÚ	repo_typeÚrepo_idÚ_raw_revisionr?   ÚrevisionÚDEFAULT_REVISIONÚsafe_revisionÚpath_in_repor@   )rC   Ú	repo_paths   & r9   Ú__post_init__Ú0HfFileSystemResolvedRepositoryPath.__post_init__=   s�   € Ü×5Ñ5×9Ñ9¸$¿.¹.È"ÓMÐPT×P\ÑP\Õ\ˆ	Ø××ÐØ$˜+ Q t×'9Ñ'9Ð&:Ð;ˆD�IØ�]‰]œi×8Ñ8Ô8Ø$˜+ Q¤}°T·]±]Ó'CÐ&DÐEˆD�Ià!ŒIØ×%Ñ%ˆŽ	r<   c                ó|   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ R,          ;R&   # )	r3   r\   r]   r_   rb   r?   r@   Nr^   r5   )r7   r8   s   "€r9   r:   Ú/HfFileSystemResolvedRepositoryPath.__annotate__/   sa   ø‡ ‚ ñ �Nñ	 ñ
 �Lñ ñ �Mñ ñ Ññ ñ Ñ!ñ ñ Ñ!ñ ñ ˜•:Ñ?ò r<   )r@   r?   )rH   rI   rJ   rK   rL   r	   r?   r@   r^   rd   rM   rN   rO   rP   s   @r9   rR   rR   /   s8   ø‡ € áVñ ˜5Ô!€DÙ˜5Ô!€Dñ !&¨d¸Ô ?€Mò&÷ ƒ r<   rR   c                   óH   a € ] tR t^Ht o Rt]! RR7      tR tV 3R ltRt	V t
R# )ÚHfFileSystemResolvedBucketPathzHData structure containing information about a resolved path in a bucket.FrS   c                ó6   € R V P                   ,           V n        R# )zbuckets/N)Ú	bucket_idr?   rB   s   &r9   rd   Ú,HfFileSystemResolvedBucketPath.__post_init__O   s   € Ø §¡Õ/ˆŽ	r<   c                ó2   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   # )r3   rk   r?   r5   )r7   r8   s   "€r9   r:   Ú+HfFileSystemResolvedBucketPath.__annotate__H   s   ø‡ ‚ ñ �Nñ	 ñ
 Ñ!ò r<   )r?   N)rH   rI   rJ   rK   rL   r	   r?   rd   rM   rN   rO   rP   s   @r9   ri   ri   H   s    ø‡ € áRñ ˜5Ô!€Dò0÷ ƒ r<   ri   c                   ó<   a a€ ] tR t^Wt oRtV 3R ltR tRtVtV ;t	# )Ú_CachedaÆ  
Metaclass for caching HfFileSystem instances according to the args.

This creates an additional reference to the filesystem, which prevents the
filesystem from being garbage collected when all *user* references go away.
A call to the :meth:`AbstractFileSystem.clear_instance_cache` must *also*
be made for a filesystem instance to be garbage collected.

This is a slightly modified version of `fsspec.spec._Cached` to improve it.
In particular in `_tokenize` the pid isn't taken into account for the
`fs_token` used to identify cached instances. The `fs_token` logic is also
robust to defaults values and the order of the args. Finally new instances
reuse the states from sister instances in the main thread.
c                ó6   <€ \         SV `  ! V/ VB  / V n        R # ©N)ÚsuperÚ__init__Ú_cache)ÚclsÚargsÚkwargsÚ	__class__s   &*,€r9   rt   Ú_Cached.__init__g   s   ø€ ä‰Ò˜$Ð) &Ò)ð ˆŽ
r<   c                ó  € \        W4      pVP                  R R4      pV P                  ! V \        P                  ! 4       .VO5/ VB pV P                  ! V \        P
                  ! 4       P                  .VO5/ VB pV'       g<   V P                  '       d*   W@P                  9   d   W@n	        V P                  V,          # \        P                  ! V .VO5/ VB pV'       gi   V P                  '       dW   WPP                  9   dG   V P                  V,          P                  4       pVP                  4        F  w  r‰\        WhV	4       K  	  WFn        Wn        W&n        V P                  '       d   V'       g   W@n	        W`P                  V&   V# )Úskip_instance_cacheF)r   ÚpopÚ	_tokenizeÚ	threadingÚ	get_identÚmain_threadÚidentÚcachableru   Ú_latestÚtypeÚ__call__Ú_get_instance_stateÚitemsÚsetattrÚ
_fs_token_Ústorage_argsÚstorage_options)
rv   rw   rx   ÚskipÚfs_tokenÚfs_token_main_threadÚobjÚinstance_stateÚattrÚstate_values
   &*,       r9   r†   Ú_Cached.__call__o   s0  € ô ˜cÓ*ˆØ�z‰zÐ/°Ó7ˆØ—=’= ¤i×&9Ò&9Ó&;ÐM¸dÒMÀfÑMˆØ"Ÿ}š}¨S´)×2GÒ2GÓ2I×2OÑ2OÐaÐRVÒaÐZ`ÑaÐß˜ŸŸ˜¨·Z±ZÔ)?à"ŒKØ—:‘:˜hÕ'Ð'ô —-’- Ð5 dÒ5¨fÑ5ˆCß˜CŸLŸL˜LÐ-AÇZÁZÔ-Oà!$§¡Ð,@Õ!A×!UÑ!UÓ!W�Ø)7×)=Ñ)=Ö)?Ñ%�DÜ˜C {Ö3ñ *@à%ŒNØ#ÔØ"(ÔØ�|�|ˆ|§DØ&”Ø'*—
‘
˜8Ñ$ØˆJr<   rG   )
rH   rI   rJ   rK   rL   rt   r†   rN   rO   Ú__classcell__©ry   r8   s   @@r9   rp   rp   W   s   ù‡ € ñõ÷ò r<   rp   c                   ó8  a a€ ] tR t^Œt oRtRtRtRRRRRRRR/V3R	 lV 3R
 lllt]V3R lR l4       t	V3R lR lt
V3R lR ltR9V3R lR lltR9V3R lR lltR:V3R lR lltR9V3R lR lltR;V3R lR lltR<V3R lR lltR=V3R lR lltV3R lR  ltV3R! lV 3R" lltR9V3R# lV 3R$ llltR>V3R% lR& lltR9V3R' lR( lltV3R) lR* ltR?V3R+ lR, lltR- tR. tR/ tV3R0 lR1 lt]R3V3R2 lV 3R3 lllt] R4 4       t!R5 t"R6 t#R7 t$R8t%Vt&V ;t'# )@ÚHfFileSystema®	  
Access a remote Hugging Face Hub repository as if were a local file system.

> [!WARNING]
> [`HfFileSystem`] provides fsspec compatibility, which is useful for libraries that require it (e.g., reading
>     Hugging Face datasets directly with `pandas`). However, it introduces additional overhead due to this compatibility
>     layer. For better performance and reliability, it's recommended to use `HfApi` methods when possible.

The file system supports paths for the `hf://` protocol, which follows those URL schemes:

* Models, Datasets and Spaces repositories:

    ```
    hf://<repo-id>[@<revision>]/<path/in/repo>
    hf://datasets/<repo-id>[@<revision>]/<path/in/repo>
    hf://spaces/<repo-id>[@<revision>]/<path/in/repo>
    ```

* Buckets (generic storage):

    ```
    hf://buckets/<bucket-id>/<path/in/bucket>
    ```

Note: when using the [`HfFileSystem`] directly, passing the `hf://` protocol prefix is optional in paths.

Args:
    endpoint (`str`, *optional*):
            Endpoint of the Hub. Defaults to <https://huggingface.co>.
    token (`bool` or `str`, *optional*):
        A valid user access token (string). Defaults to the locally saved
        token, which is the recommended method for authentication (see
        https://huggingface.co/docs/huggingface_hub/quick-start#authentication).
        To disable authentication, pass `False`.
    block_size (`int`, *optional*):
        Block size for reading and writing files.
    expand_info (`bool`, *optional*):
        Whether to expand the information of the files.
    **storage_options (`dict`, *optional*):
        Additional options for the filesystem. See [fsspec documentation](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem.__init__).

Usage:

```python
>>> from huggingface_hub import hffs

>>> # List files
>>> hffs.glob("my-username/my-model/*.bin")
['my-username/my-model/pytorch_model.bin']
>>> hffs.ls("datasets/my-username/my-dataset", detail=False)
['datasets/my-username/my-dataset/.gitattributes', 'datasets/my-username/my-dataset/README.md', 'datasets/my-username/my-dataset/data.json']

>>> # Read/write files
>>> with hffs.open("my-username/my-model/pytorch_model.bin") as f:
...     data = f.read()
>>> with hffs.open("my-username/my-model/pytorch_model.bin", "wb") as f:
...     f.write(data)
```

Specify a token for authentication:
```python
>>> from huggingface_hub import HfFileSystem
>>> hffs = HfFileSystem(token=token)
```
rX   ÚhfÚendpointNÚtokenÚ
block_sizeÚexpand_infoc          	      óz   <€ V ^8„  d   QhRS[ R,          RS[S[ ,          R,          RS[R,          RS[R,          /# )r3   rš   Nr›   rœ   r�   ©r6   ÚboolÚint)r7   r8   s   "€r9   r:   ÚHfFileSystem.__annotate__Ò   sJ   ø€ ÷ <ñ <ñ ˜•*ð<ñ ‘c�z˜DÕ ð	<ñ
 ˜$•Jð<ñ ˜D•[ñ<r<   c               óÖ   <€ \         SV `  ! V/ VB  T;'       g    \        P                  V n        W n        \        WR 7      V n        W0n        W@n	        / V n
        / V n        / V n        R# ))rš   r›   N)rs   rt   r   ÚENDPOINTrš   r›   r%   Ú_apirœ   r�   Ú_repo_and_revision_exists_cacheÚ_bucket_exists_cacheÚdircache)rC   rš   r›   rœ   r�   rw   rŒ   ry   s   &$$$$*,€r9   rt   ÚHfFileSystem.__init__Ò   se   ø€ ô 	‰Ò˜$Ð2 /Ò2Ø ×6Ð6¤I×$6Ñ$6ˆŒØŒ
Ü 8Ô9ˆŒ	Ø$ŒØ&Ôð rtˆÔ,àNPˆÔ!ð :<ˆŽr<   c                ó&   <€ V ^8„  d   QhRS[ RS[/# )r3   Úthreading_identr4   )r¡   r6   )r7   r8   s   "€r9   r:   r¢   ì   s   ø€ ÷ 	ñ 	©ð 	Áñ 	r<   c                ó8  € VP                  R4      ;'       g    \        P                  VR&   VP                  R4      VR&   \        V4       Uu/ uF  qDW4,          bK  	  ppWW#3p\	        \        V4      P                  4       4      pVP                  4       # u upi )zDeterministic token for cachingrš   r›   )r[   r   r¤   Úsortedr.   r6   ÚencodeÚ	hexdigest)rv   r«   rw   rx   ÚkeyÚtokenize_argsÚhs   &&*,   r9   r~   ÚHfFileSystem._tokenizeë   s‡   € ð $ŸZ™Z¨
Ó3×IÐI´y×7IÑ7IˆˆzÑØ Ÿ*™* WÓ-ˆˆw‰Ü.4°V¬nÓ=©n s�v•{Ò"©nˆÐ=à¨tÐ<ˆÜ”�MÓ"×)Ñ)Ó+Ó,ˆØ�{‰{‹}Ðùò	 >s   ÁBc                ód   <€ V ^8„  d   QhRS[ RS[ RS[ R,          RS[S[S[R,          3,          /# )r3   r\   r]   r_   Nr4   ©r6   Útupler    Ú	Exception)r7   r8   s   "€r9   r:   r¢   ÷   sF   ø€ ÷ Tñ TÙðTÙ'*ðTÙ69¸DµjðTá	‰t‘Y Õ%Ð%Õ	&ñTr<   c                óæ  € WV3V P                   9  dP    V P                  P                  W#V\        P                  R 7       RV P                   WV3&   RV P                   WR3&   V P                   WV3,          #   \
        \        3 d1   pRT3T P                   YT3&   RT3T P                   YR3&    Rp?LQRp?i\         d/   pRT3T P                   YT3&   RT P                   YR3&    Rp?LˆRp?ii ; i))r_   r\   ÚtimeoutNF©TN)r¦   r¥   Ú	repo_infor   ÚHF_HUB_ETAG_TIMEOUTr   r)   r   )rC   r\   r]   r_   Úes   &&&& r9   Ú_repo_and_revision_existÚ%HfFileSystem._repo_and_revision_exist÷   s  € ð  Ð)°×1UÑ1UÔUð^Ø—	‘	×#Ñ#Ø¸)ÌY×MjÑMjð $ô ð Xb�×4Ñ4°iÈ(Ð5SÑTØS]�×4Ñ4°iÈ$Ð5OÑPØ×3Ñ3°YÈÐ4RÕSÐSøô ,Ô->Ð?ô \ØW\Ð^_ÐW_�×4Ñ4°iÈ(Ð5SÑTØSXÐZ[ÐS[�×4Ñ4°iÈ$Ð5OÖPûÜ(ô ^ØW\Ð^_ÐW_�×4Ñ4°iÈ(Ð5SÑTØS]�×4Ñ4°iÈ$Ð5OÖPûð^ús)   •,A8 Á8C0Â	&B4Â4C0ÃC0Ã$C+Ã+C0c                óJ   <€ V ^8„  d   QhRS[ RS[S[S[R,          3,          /# )r3   rk   r4   Nrµ   )r7   r8   s   "€r9   r:   r¢   
  s*   ø€ ÷ 4ñ 4©ð 4±±d¹IÈÕ<LÐ6LÕ0Mñ 4r<   c                óð   € WP                   9  d,    V P                  P                  V4       RV P                   V&   V P                   V,          #   \         d   pRT3T P                   T&    Rp?L4Rp?ii ; i)TNFrº   )r§   r¥   Úbucket_infor   )rC   rk   r½   s   && r9   Ú_bucket_existsÚHfFileSystem._bucket_exists
  sr   € Ø×5Ñ5Ô5ðBØ—	‘	×%Ñ% iÔ0ð 8B�×)Ñ)¨)Ñ4Ø×(Ñ(¨Õ3Ð3øô	 'ô @Ø7<¸a°x�×)Ñ)¨)Ö4ûð@ús   ’A ÁA5ÁA0Á0A5c                óJ   <€ V ^8„  d   QhRS[ RS[ R,          RS[S[,          /# ©r3   r@   r_   Nr4   )r6   rR   ri   )r7   r8   s   "€r9   r:   r¢     s4   ø€ ÷ M
ñ M
ÙðM
Ù#&¨¥:ðM
á	+Ñ.LÕ	LñM
r<   c                ó4  € V P                  V4      pV'       g   \        R4      hVP                  R4      ^ 8X  d   \        RV R24      h\	        \
        P                   V 24      pVP                  '       dR   V P                  VP                  4      w  rEV'       g   \        W4       \        VP                  VP                  R7      # VEe   VP                  e÷   VP                  V8w  dæ   VP                  R4      ^ ,          \
        P                  9   d   VP                  R^4      ^,          MTpVP                  R^4      w  rxRV9   d   VP                  R^4      MVR3w  rš\!        V	4      pW²8w  d   \        R	V R
V R24      hV P#                  VP$                  Wr4      w  rÅV'       g   \        W4       \'        VP$                  WrW©R7      # VP                  e   Vf   VP                  pV P#                  VP$                  VP                  V4      w  rÅV'       g   \        W4       RpRV9   d¢   VP                  e”   VP                  R4      ^ ,          \
        P                  9   d   VP                  R^4      ^,          MTpVP                  R^4      ^,          pVP                  '       d!   VR\)        VP                  4      ^,           )  MTpVe   TM\
        P*                  p\'        VP$                  VP                  W#P                  VR7      # )a  
Resolve a Hugging Face file system path into its components.

Args:
    path (`str`):
        Path to resolve.
    revision (`str`, *optional*):
        The revision of the repo to resolve. Defaults to the revision specified in the path.

Returns:
    [`HfFileSystemResolvedPath`]: Resolved path information containing `repo_type`, `repo_id`, `revision` and `path_in_repo`.

Raises:
    `ValueError`:
        If path contains conflicting revision information.
    `NotImplementedError`:
        If trying to list repositories.
z<Access to buckets and repositories lists is not implemented.r>   z-Repository id must be 'namespace/name', got 'z<'. Single-segment ids (e.g. 'gpt2') are no longer supported.)rk   r@   NrY   rX   zRevision specified in path ("z ") and in `revision` argument ("z") are not the same.)r^   )Ú_strip_protocolÚNotImplementedErrorÚcountÚ
ValueErrorr-   r   ÚHF_PROTOCOLÚ	is_bucketrÃ   ÚidÚ_raise_file_not_foundri   rb   r_   ÚsplitÚHF_URI_TYPE_PREFIXESr   r¾   r…   rR   Úlenr`   )rC   r@   r_   ÚparsedÚbucket_existsÚerrÚpath_without_typer]   Úafter_atÚrevision_in_pathrb   Úrevision_in_path_decodedÚrepo_and_revision_existÚraw_revisionÚraw_after_ats   &&&            r9   Úresolve_pathÚHfFileSystem.resolve_path  sÎ  € ð* ×#Ñ# DÓ)ˆßÜ%Ð&dÓeÐeØ�:‰:�c‹?˜aÔÜØ?À¸vð  FBð  Cóð ô ¤×!6Ñ!6Ð 7¸°vÐ>Ó?ˆð ××ÐØ!%×!4Ñ!4°V·Y±YÓ!?ÑˆMß Ü% dÔ0Ü1¸F¿I¹IÈF×L_ÑL_Ô`Ð`ð Ó F§O¡OÒ$?ÀFÇOÁOÐW_ÔD_ð
 :>¿¹ÀC»ÈÕ9KÌy×OmÑOmÔ9m §
¡
¨3°Ó 2°1Ö 5ÐswÐØ 1× 7Ñ 7¸¸QÓ ?ÑˆGØGJÈhÄ¨X¯^©^¸CÀÔ-CÐ]eÐgiÐ\jÑ*ÐÜ'.Ð/?Ó'@Ð$Ø'Ô3Ü Ø3Ð4LÐ3MÐMmÐnvÐmwð  xLð  Móð ð ,0×+HÑ+HÈÏÉÐV]Ó+hÑ(Ð#ß*Ü% dÔ0Ü5Ø—‘˜W°ôð ð �?‰?Ò&¨8Ò+;Ø—‘ˆHà'+×'DÑ'DÀVÇ[Á[ÐRX×R[ÑR[Ð]eÓ'fÑ$Ðß&Ü! $Ô,ð $(ˆØ�$Œ;˜6Ÿ?™?Ò6Ø9=¿¹ÀC»ÈÕ9KÌy×OmÑOmÔ9m §
¡
¨3°Ó 2°1Ö 5ÐswÐØ,×2Ñ2°3¸Ó:¸1Õ=ˆLØNT×Na×NaÐNa˜<Ð(I¬C°×0CÑ0CÓ,DÀqÕ,HÐ*IÑJÐgsˆLà'Ò3‘8¼×9SÑ9SˆÜ1Ø�K‰K˜Ÿ™ H×.AÑ.AÐQ]ô
ð 	
r<   c                ó2   <€ V ^8„  d   QhRS[ R,          RR/# )r3   r@   Nr4   r5   )r7   r8   s   "€r9   r:   r¢   c  s#   ø€ ÷ Qñ Q¡S¨4¥Zð Q¸4ñ Qr<   c                ó¶  € V'       g7   V P                   P                  4        V P                  P                  4        R# V P                  V4      pVP	                  4       pV'       d0   V P                   P                  VR4       V P                  V4      pK7  VP                  '       g±   \        V\        4      '       ds   V P                  P                  VP                  VP                  R3R4       V P                  P                  VP                  VP                  VP                  3R4       R# V P                  P                  VP                  R4       R# R# )a3  
Clear the cache for a given path.

For more details, refer to [fsspec documentation](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem.invalidate_cache).

Args:
    path (`str`, *optional*):
        Path to clear from cache. If not provided, clear the entire cache.

N)r¨   Úclearr¦   rÝ   rD   r}   Ú_parentr@   Ú
isinstancerR   r\   r]   r_   r§   rk   )rC   r@   Úresolved_paths   && r9   Úinvalidate_cacheÚHfFileSystem.invalidate_cachec  s  € ÷ Ø�M‰M×ÑÔ!Ø×0Ñ0×6Ñ6Ö8à ×-Ñ-¨dÓ3ˆMØ ×*Ñ*Ó,ˆDßØ—‘×!Ñ! $¨Ô-Ø—|‘| DÓ)’ð !×%×%Ð%Ü˜mÔ-O×PÒPØ×8Ñ8×<Ñ<Ø&×0Ñ0°-×2GÑ2GÈÐNÐPTôð ×8Ñ8×<Ñ<Ø&×0Ñ0°-×2GÑ2GÈ×I_ÑI_Ð`Ðbföð ×-Ñ-×1Ñ1°-×2IÑ2IÈ4ÖPñ &r<   c                ób   <€ V ^8„  d   QhRS[ RS[ RS[R,          RS[ R,          RS[R,          /# )r3   r@   Úmoderœ   Nr_   r4   )ÚHfFileSystemFileÚHfFileSystemStreamFile)r6   r¡   r   )r7   r8   s   "€r9   r:   r¢   „  sR   ø€ ÷ Xñ XáðXñ ðXñ ˜$•Jð	Xñ
 ˜•*ðXñ 
Ð;Õ	<ñXr<   c                ó¨   € Ve   TMV P                   pVe   W5R&   RV9   d   \        R4      hV^ 8X  d   \        W3RVRV/VB # \        W3RVRV/VB # )Nrœ   Úaz/Appending to remote files is not yet supported.rè   r_   )rœ   rÉ   rê   ré   )rC   r@   rè   rœ   r_   rx   s   &&&&&,r9   Ú_openÚHfFileSystem._open„  sr   € ð $.Ò#9‘Z¸t¿¹ˆ
ØÒ!Ø#-�<Ñ Ø�$Œ;Ü%Ð&WÓXÐXØ˜Œ?Ü)¨$Ñ]¸4Ð]È(Ð]ÐV\Ñ]Ð]ä# DÑW°TÐWÀHÐWÐPVÑWÐWr<   c                ó8   <€ V ^8„  d   QhRS[ RS[ R,          RR/# rÆ   r5   )r7   r8   s   "€r9   r:   r¢   –  s&   ø€ ÷ >ñ >™ð >¡s¨T¥zð >Àtñ >r<   c                óà  € V P                  WR 7      p\        V\        4      '       d4   V P                  P	                  VP
                  VP                  .R7       MrV P                  P                  VP                  VP                  V P                  VP                  VP                  VP                  R4      VP                  R4      R7       V P                  VP                  4       R7       R# )©r_   ©ÚdeleteÚcommit_messageÚcommit_description)rb   r]   r›   r\   r_   rô   rõ   ©r@   N)rÝ   rã   ri   r¥   Úbatch_bucket_filesrk   r@   Údelete_filerb   r]   r›   r\   r_   r[   rå   rD   )rC   r@   r_   rx   rä   s   &&&, r9   Ú_rmÚHfFileSystem._rm–  sÁ   € Ø×)Ñ)¨$Ð)ÓBˆÜ�mÔ%C×DÒDØ�I‰I×(Ñ(¨×)@Ñ)@È-×J\ÑJ\ÐI]Ð(Õ^à�I‰I×!Ñ!Ø*×7Ñ7Ø%×-Ñ-Ø—j‘jØ'×1Ñ1Ø&×/Ñ/Ø%Ÿz™zÐ*:Ó;Ø#)§:¡:Ð.BÓ#Cð "ô ð 	×Ñ =×#:Ñ#:Ó#<ÐÖ=r<   c          
      óR   <€ V ^8„  d   QhRS[ RS[RS[R,          RS[ R,          RR/# )r3   r@   Ú	recursiveÚmaxdepthNr_   r4   rŸ   )r7   r8   s   "€r9   r:   r¢   ¦  sE   ø€ ÷ 0>ñ 0>áð0>ñ ð0>ñ ˜•*ð	0>ñ
 ˜•*ð0>ð 
ñ0>r<   c                óŽ  € V P                  WR7      pV P                  WW4R7      p\        V\        4      '       dk   V Uu. uF6  qP	                  V4      '       d   K  V P                  V4      P
                  NK8  	  ppV P                  P                  VP                  VR7       MðV Uu. uF6  qP	                  V4      '       d   K  V P                  V4      P
                  NK8  	  p	pV	 U
u. uF  p
\        V
R7      NK  	  pp
RX R2pYÂ'       d   RMR,          pYÃe   R
V R2MR,          pV P                  P                  VP                  VP                  V P                  VVP                  VP                  RV4      VP                  R4      R7       V P!                  VP#                  4       R7       R	# u upi u upi u up
i )ad  
Delete files from a repository.

For more details, refer to [fsspec documentation](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem.rm).

> [!WARNING]
> Note: When possible, use `HfApi.delete_file()` for better performance.

Args:
    path (`str`):
        Path to delete.
    recursive (`bool`, *optional*):
        If True, delete directory and all its contents. Defaults to False.
    maxdepth (`int`, *optional*):
        Maximum number of subdirectories to visit when deleting recursively.
    revision (`str`, *optional*):
        The git revision to delete from.

rñ   )rü   rý   r_   rò   )rb   zDelete Ú zrecursively rX   Nzup to depth rô   rõ   )r]   r\   r›   Ú
operationsr_   rô   rõ   rö   )rÝ   Úexpand_pathrã   ri   Úisdirr@   r¥   r÷   rk   r   Úcreate_commitr]   r\   r›   r_   r[   rå   rD   )rC   r@   rü   rý   r_   rx   rä   Úpathsró   Úpaths_in_reporb   r   rô   s   &&&&&,       r9   ÚrmÚHfFileSystem.rm¦  s‘  € ð6 ×)Ñ)¨$Ð)ÓBˆØ× Ñ  ÀXÐ ÓaˆÜ�mÔ%C×DÒDÙ?DÓ]¹u°tÏJÉJÐW[×L\Ô2�d×'Ñ'¨Ó-×2Ô2¹uˆFÐ]Ø�I‰I×(Ñ(¨×)@Ñ)@ÈÐ(ÕPáFKÓdÁe¸d×S]ÑS]Ð^b×ScÔ9˜T×.Ñ.¨tÓ4×9Ô9ÁeˆMÐdÙ_lÓmÑ_lÈ|Ô/¸\×JÑ_lˆJÐmØ& t f¨AÐ.ˆNØ¶	™n¸rÕAˆNØÒ<P ¨X¨J°aÑ8ÐVXÕXˆNà�I‰I×#Ñ#Ø%×-Ñ-Ø'×1Ñ1Ø—j‘jØ%Ø&×/Ñ/Ø%Ÿz™zÐ*:¸NÓKØ#)§:¡:Ð.BÓ#Cð $ô ð 	×Ñ =×#:Ñ#:Ó#<ÐÖ=ùò% ^ùò eùÚms   Á F8ÁF8Â*F=ÃF=Ã,Gc                ó|   <€ V ^8„  d   QhRS[ RS[RS[RS[ R,          RS[S[ S[S[ S[3,          ,          ,          /# )r3   r@   ÚdetailÚrefreshr_   Nr4   )r6   r    ÚlistÚdictr   )r7   r8   s   "€r9   r:   r¢   Ø  sL   ø€ ÷ );ñ );Ùð);Ù!%ð);Ù7;ð);ÙORÐUYÍzð);á	‰c‘D™™c˜•NÕ"Õ	#ñ);r<   c                ó  € V P                  WR7      pVP                  4       p V P                  ! V3RVRV/VB pV'       d   V# V Uu. uF  qˆR,          NK  	  up#   \         dŸ    TP                  '       g   \        TR4        T P                  ! T P                  T4      3RTRT/TB pM  \         d    . p Mi ; iT Uu. uF  qˆR,          T8X  g   K  TNK  	  Mu upi pp\        T4      ^ 8X  d   \        TR4        LÊi ; iu upi )aG  
List the contents of a directory.

For more details, refer to [fsspec documentation](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem.ls).

> [!WARNING]
> Note: When possible, use `HfApi.list_repo_tree()` for better performance.

Args:
    path (`str`):
        Path to the directory.
    detail (`bool`, *optional*):
        If True, returns a list of dictionaries containing file information. If False,
        returns a list of file paths. Defaults to True.
    refresh (`bool`, *optional*):
        If True, bypass the cache and fetch the latest data. Defaults to False.
    revision (`str`, *optional*):
        The git revision to list from.

Returns:
    `list[Union[str, dict[str, Any]]]`: List of file paths (if detail=False) or list of file information
    dictionaries (if detail=True).
rñ   r
  r_   NÚname)rÝ   rD   Ú_ls_treer   r@   rÏ   râ   rÒ   )	rC   r@   r	  r
  r_   rx   rä   ÚoutÚos	   &&&&&,   r9   ÚlsÚHfFileSystem.lsØ  s  € ð4 ×)Ñ)¨$Ð)ÓBˆØ×&Ñ&Ó(ˆð	2Ø—-’- ÑS¨gÐSÀÐSÈFÑSˆC÷ ˆsÐ:±cÓ":±c° V§9 9±cÑ":Ð:øô "ô 
	2à ×%×%Ð%Ü% d¨DÔ1ðØ—m’m D§L¡L°Ó$6ÑeÀÐeÐRZÐeÐ^dÑe‘øÜ%ô Ø’ðúá!Ó7™c˜ v¥Y°$Ñ%6—1�1šcùÒ7ˆCÐ7Ü�3‹x˜1Œ}Ü% d¨DÔ1ùð
	2üò #;sS   ¤A Á	D	ÁDÁ:DÂ&B.Â-DÂ.B>Â;DÂ=B>Â>DÃC ÃC Ã$DÄDc                óh   <€ V ^8„  d   QhRS[ RS[RS[RS[ R,          RS[R,          RS[R,          /# )r3   r@   rü   r
  r_   Nr�   rý   rŸ   )r7   r8   s   "€r9   r:   r¢     s[   ø€ ÷ Kñ KáðKñ ðKñ ð	Kñ
 ˜•*ðKñ ˜D•[ðKñ ˜•*ñKr<   c                óx  € Ve   TMV P                   e   V P                   MRpV P                  WR7      pVP                  4       pVP                  pV'       d   TM^p. p	WP                  9   Ed   V'       Eg   V P                  V,          p
V	P                  V
4       . pV'       dí   ^p\        V
 Uu. uF  qÝR,          R8X  g   K  WÍ3NK  	  up4      pV'       d¸   VP                  4       w  rÏVe	   WÆ8:  g   K&  VR,          V P                  9  d   VP                  VR,          4       KX  V P                  VR,          ,          p
V	P                  V
4       TP                  V
 Uu. uF  pVR,          R8X  g   K  V^,           V3NK   	  up4       K¿  . pV'       dK   \        V\        4      '       d5   V	 Uu. uF(  pVR,          e   K  V P                  VR,          4      NK*  	  ppV'       d	   V'       g   V'       Ed}   V'       Edt   \        P                  P                  VV,           4      pVP                  R4      '       g   VV8X  g   V\!        VV4      9   d   VP#                  R4      MV P                  V4      pVe'   V\%        V4      R  P'                  R4      pVV,          pV	 Uu. uF,  pVR,          P)                  VR,           4      '       d   K*  VNK.  	  p	p\+        V P                  4       F?  pVP)                  VR,           4      '       g   K#  V P                  P-                  VR 4       KA  	  V P                  P-                  VR 4       V	P                  V P/                  VVRVVVR	7      4       V	# \        V\0        4      '       d*   V P3                  VP4                  VP                  VR
7      pMIV P6                  P9                  VP:                  VP                  VVVP<                  VP>                  R7      pV EF™  pVR,           VP                  ,           p\        V\@        4      '       dP   RVRVPB                  RRRVPD                  RVPF                  RVPH                  RVPJ                  RVPL                  /pM˜\        V\N        4      '       d8   RVRVPB                  RRRVPH                  RVPP                  RVPR                  /pMK\        V\T        4      '       d"   RVR^ RRRVPV                  RVPJ                  /pMRVR^ RRRVPR                  /pV P                  VR,          4      pV P                  PY                  V. 4      P                  V4       V\%        V4      R  P'                  R4      pVe
   WÆ8:  g   EKˆ  V	P                  V4       EKœ  	  V	# u upi u upi u upi u upi )NFrñ   r…   Ú	directoryr  Úlast_commitr>   T)rü   r
  r_   r�   rý   )Úprefixrü   )rü   Úexpandr_   r\   ÚsizeÚfileÚblob_idÚlfsÚxet_hashÚsecurityÚmtimeÚuploaded_atÚtree_id)-r�   rÝ   rD   r?   r¨   Úextendr   ÚpopleftÚappendrã   rR   râ   Úosr@   ÚcommonprefixÚendswithr   rA   rÒ   rÊ   Ú
startswithr  r}   r  ri   Ú_list_bucket_tree_with_foldersrk   r¥   Úlist_repo_treer]   r_   r\   r'   r  r  r  r  r  r  r#   r   r!  r(   r"  Ú
setdefault)rC   r@   rü   r
  r_   r�   rý   rä   Ú	root_pathr  Úcached_path_infosÚdirs_not_in_dircacheÚdepthÚ	path_infoÚdirs_to_visitÚdir_infoÚdirs_not_expandedr  Úcommon_prefixÚcommon_pathÚcommon_path_depthÚcached_pathÚtreeÚ
cache_pathÚcache_path_infoÚparent_paths   &&&&&&&                   r9   r  ÚHfFileSystem._ls_tree  sC  € ð 'Ò2‰KÈT×M]ÑM]ÒMi¸×9IÒ9IÐotð 	ð ×)Ñ)¨$Ð)ÓBˆØ×&Ñ&Ó(ˆØ!×&Ñ&ˆ	ß(‘8¨aˆàˆØ—=‘=Õ ¯¨Ø $§¡¨dÕ 3ÐØ�J‰JÐ(Ô)Ø#%Ð ßð �Ü %Ù9JÓoÑ9J¨IÐX^ÕN_ÐcnÑNnÔ'�eÓ'Ñ9JÑoó!�÷ $Ø&3×&;Ñ&;Ó&=‘O�EØÒ'¨5Ö+<Ø# FÕ+°4·=±=Ô@Ø0×7Ñ7¸ÀÕ8HÖIà04·±¸hÀvÕ>NÕ0OÐ-ØŸJ™JÐ'8Ô9Ø)×0Ñ0ñ 6Gó!"á5F¨	Ø'0°Õ'8¸KÑ'Gô %; U¨Q¥Y°	Ó$:Ù5Fñ!"öð !#Ðßœz¨-Ô9[×\Ò\áFIÓ$fÁcÀÈQÈ}ÕM]Ô%< T§\¡\°!°Fµ)Ö%<ÁcÐ!Ð$fç×2¿¸×HYÐHYô !#§¡× 4Ñ 4Ð5IÐL]Õ5]Ó ^�ð %×-Ñ-¨c×2Ò2Ø$¨	Ô1Ø$¬Ð.BÐDUÓ(VÔVð "×(Ñ(¨Ô-ð Ÿ™ mÓ4ð ð Ò'Ø(3´C¸³I°KÐ(@×(FÑ(FÀsÓ(KÐ%ØÐ 1Õ1�HÙ"%ÓU¡#˜Q¨Q¨v­Y×-AÑ-AÀ+ÐPSÕBS×-T—q�q¡#�ÐUÜ#'¨¯©Ö#6�KØ"×-Ñ-¨k¸CÕ.?×@Ô@ØŸ™×)Ñ)¨+°tÖ<ñ $7ð —‘×!Ñ! +¨tÔ4Ø—
‘
Ø—M‘MØ#Ø"+Ø $Ø!)Ø$/Ø!)ð "ó ô	ðJ ˆ
ôs ˜-Ô)G×HÒHØ×:Ñ:Ø!×+Ñ+Ø(×-Ñ-Ø'ð ;ó ‘ð —y‘y×/Ñ/Ø!×)Ñ)Ø!×&Ñ&Ø'Ø&Ø*×3Ñ3Ø+×5Ñ5ð 0ó �ô "�	Ø&¨�_¨y¯~©~Õ=�
Ü˜i¬×2Ò2à 
Ø 	§¡Ø Ø! 9×#4Ñ#4Ø˜yŸ}™}Ø" I×$6Ñ$6Ø% y×'<Ñ'<Ø" I×$6Ñ$6ð	'‘Oô   	¬:×6Ò6à 
Ø 	§¡Ø Ø" I×$6Ñ$6Ø §¡Ø% y×'<Ñ'<ð'‘Oô   	¬:×6Ò6à 
Ø Ø Ø! 9×#4Ñ#4Ø% y×'<Ñ'<ð'‘Oð  
Ø Ø Ø% y×'<Ñ'<ð	'�Oð #Ÿl™l¨?¸6Õ+BÓC�Ø—‘×(Ñ(¨°bÓ9×@Ñ@ÀÔQØ"¤3 t£9 ;Ð/×5Ñ5°cÓ:�ØÒ# u×'8Ø—J‘J˜×/ñS "ðT ˆ
ùòa pùò!"ùò %gùò" Vs0   Â2V(ÃV(Å&V-Å;V-Æ7V2Ç	V2Ê.'V7ËV7c          
      óR   <€ V ^8„  d   QhRS[ RS[ RS[RS[S[S[,          ,          /# )r3   rk   r  rü   r4   )r6   r    r   r#   r$   )r7   r8   s   "€r9   r:   r¢   �  s7   ø€ ÷ &ñ &Ùð&Ù&)ð&Ù6:ð&á	‘*™|Õ+Õ	,ñ&r<   c                óâ  € V P                   P                  WVR7      p/ pV'       d   ^VP                  R4      ,           M^ p. pV EF
  pVP                  V4       V'       g   K  \	        \        VP                  4      P                  4      RV) ^,
            F´  p	\        R\        V	4      VP                  R7      p
V
P                  V9  d"   VP                  V
4       W¥V
P                  &   KV  V
P                  f   Kf  WZP                  ,          pVP                  e   VP                  V
P                  8  g   K£  V
P                  Vn
        K¶  	  EK  	  V'       g   \        RV RV R24      hV# )	z<Same as `HfApi.list_bucket_tree` but always includes folders)rü   r>   Nr  )r…   r@   r!  zFile not found in bucket 'z': 'Ú')r¥   Úlist_bucket_treerÊ   r%  r  r   r@   Úparentsr$   r6   r!  r   )rC   rk   r  rü   Úbucket_filesÚbucket_foldersÚ	min_depthr  Úbucket_entryÚparent_bucket_folder_strÚparent_bucket_folderÚbucket_folders   &&&&        r9   r*  Ú+HfFileSystem._list_bucket_tree_with_folders�  sS  € ð —y‘y×1Ñ1°)ÈyÐ1ÓYˆØ24ˆß-3�A˜Ÿ™ SÓ)Ö)¸ˆ	Ø/1ˆä(ˆLØ�J‰J�|Ô$÷ Ùô -1´¸|×?PÑ?PÓ1Q×1YÑ1YÓ,ZÐ[kÐ^gÐ]gÐjkÕ]kÓ,lÐ(Ü'3Ø$¬3Ð/GÓ+HÐVb×VnÑVnô(Ð$ð
 (×,Ñ,°NÔBØ—J‘JÐ3Ô4Ø@TÐ#7×#<Ñ#<Ñ=Ùð (×3Ñ3Ô?Ø$2×3LÑ3LÕ$M�MØ$×0Ñ0Ò8Ø%×1Ñ1Ð4H×4TÑ4TÖTà4H×4TÑ4T˜Ö1ô# -mñ )÷6 Ü$Ð'AÀ)ÀÈDÐQWÐPXÐXYÐ%ZÓ[Ð[Øˆ
r<   c          	      óp   <€ V ^8„  d   QhRS[ RS[S[S[ S[S[ ,          S[S[ ,          3,          ,          /# ©r3   r@   r4   )r6   r   r¶   r  )r7   r8   s   "€r9   r:   r¢   ¸  s7   ø€ ÷ 7ñ 7™ð 7±(¹5ÁÁdÉ3ÅiÑQUÑVYÕQZÐAZÕ;[Õ2\ñ 7r<   c              /  óª   <"  € V P                  WP                  R4      R7      P                  4       p\        SV `  ! V.VO5/ VB  Rj  x€L
  R#  L5i)a�  
Return all files below the given path.

For more details, refer to [fsspec documentation](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem.walk).

Args:
    path (`str`):
        Root path to list files from.

Returns:
    `Iterator[tuple[str, list[str], list[str]]]`: An iterator of (path, list of directory names, list of file names) tuples.
r_   rñ   N)rÝ   r[   rD   rs   Úwalk)rC   r@   rw   rx   ry   s   &&*,€r9   rN  ÚHfFileSystem.walk¸  sI   øé € ð × Ñ  ·
±
¸:Ó0FÐ ÓG×QÑQÓSˆÜ‘7’< Ð6 tÒ6¨vÑ6×6Ô6ùs   ƒAAÁ
AÁAc                óJ   <€ V ^8„  d   QhRS[ RS[R,          RS[S[ ,          /# )r3   r@   rý   Nr4   )r6   r¡   r  )r7   r8   s   "€r9   r:   r¢   È  s*   ø€ ÷ ?ñ ?™ð ?©¨d­
ð ?ÉÉSÍ	ñ ?r<   c                óˆ   <€ V P                  WP                  R4      R7      P                  4       p\        SV `  ! V3RV/VB # )a“  
Find files by glob-matching.

For more details, refer to [fsspec documentation](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem.glob).

Args:
    path (`str`):
        Path pattern to match.
    maxdepth (`int`, *optional*):
        Maximum depth to descend into directories. By default, no limit.

Returns:
    `list[str]`: List of paths matching the pattern.
r_   rñ   rý   )rÝ   r[   rD   rs   Úglob)rC   r@   rý   rx   ry   s   &&&,€r9   rR  ÚHfFileSystem.globÈ  sC   ø€ ð × Ñ  ·
±
¸:Ó0FÐ ÓG×QÑQÓSˆÜ‰wŠ|˜DÑ>¨8Ð>°vÑ>Ð>r<   c                ó¬   <€ V ^8„  d   QhRS[ RS[R,          RS[RS[RS[RS[ R,          RS[S[ ,          S[S[ S[S[ S[3,          3,          ,          /# )	r3   r@   rý   NÚwithdirsr	  r
  r_   r4   )r6   r¡   r    r  r  r   )r7   r8   s   "€r9   r:   r¢   Ú  st   ø€ ÷ ;7ñ ;7áð;7ñ ˜•*ð;7ñ ð	;7ñ
 ð;7ñ ð;7ñ ˜•*ð;7ñ 
‰c�‘T™#™t¡C© H�~Ð-Õ.Õ	.ñ;7r<   c           	     ó˜  € Ve   V^8  d   \        R4      hV P                  WR7      pVP                  4       p V P                  ! V3RRRVRV/VB p	V'       g"   V	 U
u. uF  qªR,          R8w  g   K  V
NK  	  p	p
M-V P                  ! V3/ VB pVR,          R8X  d   V.V	,           MT	p	V	 U
u/ uF  qªR	,          V
bK  	  p	p
\        T	4      pT'       g   T# T Uu/ uF  qÝY�,          bK  	  up# u up
i u up
i   \
         dB     T P                  ! T3R
T/TB R,          R8X  d   T/ /p	 Lj/ p	 Ln  \         d    / p	  L~i ; ii ; iu upi )aE  
List all files below path.

For more details, refer to [fsspec documentation](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem.find).

Args:
    path (`str`):
        Root path to list files from.
    maxdepth (`int`, *optional*):
        Maximum depth to descend into subdirectories.
    withdirs (`bool`, *optional*):
        Include directory paths in the output. Defaults to False.
    detail (`bool`, *optional*):
        If True, returns a dict mapping paths to file information. Defaults to False.
    refresh (`bool`, *optional*):
        If True, bypass the cache and fetch the latest data. Defaults to False.
    revision (`str`, *optional*):
        The git revision to list from.

Returns:
    `Union[list[str], dict[str, dict[str, Any]]]`: List of paths or dict of file information.
zmaxdepth must be at least 1rñ   rü   Tr
  rý   r…   r  r  r_   r  )rË   rÝ   rD   r  Úinfor   ÚFileNotFoundErrorr­   )rC   r@   rý   rU  r	  r
  r_   rx   rä   r  r  r1  Únamesr  s   &&&&&&&,      r9   ÚfindÚHfFileSystem.findÚ  sh  € ð@ Ò H¨q¤LÜÐ:Ó;Ð;Ø×)Ñ)¨$Ð)ÓBˆØ×&Ñ&Ó(ˆð	.Ø—-’- Ñc°Ðc¸gÐcÐPXÐcÐ\bÑcˆC÷ Ù"%ÓB¡#˜Q¨6­°kÑ)A—q�q¡#�ÐB�ð !ŸIšI dÑ5¨fÑ5�	Ø+4°VÕ+<ÀÔ+K�y�k CÖ'ÐQT�Ù),Ó-© A�V•9˜a’<©ˆCÐ-Ü�s“ˆßØˆLá05Ó6±¨˜#�)’O±Ñ6Ð6ùò Cùò
 .øô! "ô 	ðØ—9’9˜TÑ?¨HÐ?¸Ñ?ÀÕGÈ6ÔQØ ˜*’Cà’CøÜ$ô Ø“ðúð	üò* 7sG   ºC8 ÁC.Á3C.Â-C3ÃEÃ8EÄ%D/Ä+D/Ä/E Ä<EÄ?E Å Ec                ó>   <€ V ^8„  d   QhRS[ RS[ RS[ R,          RR/# )r3   Úpath1Úpath2r_   Nr4   r5   )r7   r8   s   "€r9   r:   r¢     s.   ø€ ÷ :?ñ :?™Sð :?©ð :?¹¸d½
ð :?ÐX\ñ :?r<   c                ó‚  € V P                  WR7      pV P                  W#R7      p\        V\        4      '       g   \        V\        4      '       d   \        R4      hVP                  VP                  8H  ;'       d    VP
                  VP
                  8H  pV'       d”   RV RV 2pV P                  P                  VP
                  VP                  VP                  VP                  RV4      VP                  RR4      \        VP                  VP                  VP                  R7      .R	7       M»V P                  VR
VP                  R7      ;_uu_ 4       p	V	P                  4       p
RRR4       RV RV 2pV P                  P                  X
VP                  VP
                  V P                  VP                  VP                  VP                  RV4      VP                  R4      R7       V P!                  VP#                  4       R7       V P!                  VP#                  4       R7       R#   + '       g   i     LÎ; i)aB  
Copy a file within or between repositories.

> [!WARNING]
> Note: When possible, use `HfApi.upload_file()` for better performance.

Args:
    path1 (`str`):
        Source path to copy from.
    path2 (`str`):
        Destination path to copy to.
    revision (`str`, *optional*):
        The git revision to copy from.

rñ   z)Copy from/to buckets is not available yetzCopy z to rô   rõ   rX   )Úsrc_path_in_reporb   Úsrc_revision)r]   r\   r_   rô   rõ   r   ÚrbN©Úpath_or_fileobjrb   r]   r›   r\   r_   rô   rõ   rö   )rÝ   rã   ri   rÉ   r\   r]   r¥   r  r_   r[   r   rb   ÚopenÚreadÚupload_filer›   rå   rD   )rC   r]  r^  r_   rx   Úresolved_path1Úresolved_path2Ú	same_reporô   ÚfÚcontents   &&&&,      r9   Úcp_fileÚHfFileSystem.cp_file  s  € ð  ×*Ñ*¨5Ð*ÓDˆØ×*Ñ*¨5Ð*ÓDˆÜ�nÔ&D×EÒEÌØÔ:÷J
ò J
ô &Ð&QÓRÐRð ×$Ñ$¨×(@Ñ(@Ñ@×uÐuÀ^×E[ÑE[Ð_m×_uÑ_uÑEuð 	÷ Ø$ U G¨4°¨wÐ7ˆNØ�I‰I×#Ñ#Ø&×.Ñ.Ø(×2Ñ2Ø'×0Ñ0Ø%Ÿz™zÐ*:¸NÓKØ#)§:¡:Ð.BÀBÓ#Gä'Ø)7×)DÑ)DØ%3×%@Ñ%@Ø%3×%<Ñ%<ôðð $õ ð —‘˜5 $°×1HÑ1H�×IÔIÈQØŸ&™&›(�÷ Jà$ U G¨4°¨wÐ7ˆNØ�I‰I×!Ñ!Ø 'Ø+×8Ñ8Ø&×.Ñ.Ø—j‘jØ(×2Ñ2Ø'×0Ñ0Ø%Ÿz™zÐ*:¸NÓKØ#)§:¡:Ð.BÓ#Cð "ô 	ð 	×Ñ >×#;Ñ#;Ó#=ÐÔ>Ø×Ñ >×#;Ñ#;Ó#=ÐÖ>÷ J×Iús   ÅH.È.H>	c                ó&   <€ V ^8„  d   QhRS[ RS[/# rL  )r6   r
   )r7   r8   s   "€r9   r:   r¢   S  s   ø€ ÷ hñ h™Sð h©xñ hr<   c                ó<  € V P                   ! V3/ / VCRR/CB pRV9   d.   VR,          f   \        RV R24      hVR,          P                  # RV9   d   VR,          '       d
   VR,          # RV9   d   VR,          '       d
   VR,          # \        RV R	V R
24      h)a+  
Get the last modified time of a file.

For more details, refer to [fsspec documentation](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem.modified).

Args:
    path (`str`):
        Path to the file.

Returns:
    `datetime`: Last modified time of the file.
r�   Tr  z9'modified' is not implemented for repository paths like 'r@  r   r!  z'Cannot determined 'modified' for path 'z	' (info: Ú))rW  rÉ   Údate)rC   r@   rx   rW  s   &&, r9   ÚmodifiedÚHfFileSystem.modifiedS  s¶   € ð �yŠy˜ÑAÐ!@ FÐ!@¨M¸4Ñ!@ÑAˆØ˜DÔ Ø�MÕ"Ò*Ü)Ð,eÐfjÐekÐklÐ*mÓnÐnØ˜Õ&×+Ñ+Ð+Ø˜Œ_  g§¤Ø˜•=Ð Ø˜dÔ" t¨M×':Ô':Ø˜Õ&Ð&ä%Ð(OÐPTÈvÐU^Ð_cÐ^dÐdeÐ&fÓgÐgr<   c          
      óV   <€ V ^8„  d   QhRS[ RS[RS[ R,          RS[S[ S[3,          /# )r3   r@   r
  r_   Nr4   )r6   r    r  r   )r7   r8   s   "€r9   r:   r¢   l  s@   ø€ ÷ lñ l™ð l¡tð l¹sÀT½zð lÑ_cÑdgÑilÐdlÕ_mñ lr<   c                óü  € V P                  WR7      pVP                  4       pTP                  RV P                  e   V P                  MR4      pVP                  '       g»   RVR^ RR/p\        V\        4      '       d   RVR	&   \        V\        4      '       d€   V'       dx   V P                  P                  VP                  VP                  VP                  R
7      R,          p/ VCRRR	\        VP                  VP                  VP                  R7      /CpEMÌ\        V\         4      '       dt   V P#                  V4      p	V P%                  W’R7       V P&                  V	,           U
u. uF  qªR,          V8X  g   K  V
NK  	  pp
V'       g   \)        VR4       V^ ,          pEMCRpV P#                  V4      p	V'       g"   W�P&                  9  d   V P%                  V	4       W�P&                  9   dO   V P&                  V	,           U
u. uF  qªR,          V8X  g   K  V
NK  	  pp
V'       g   \)        VR4       V^ ,          pV'       g#   Ve   V'       Ed•   V'       EdŒ   VR	,          Ef€   V P                  P+                  VP                  VP,                  VVP                  VP                  R7      pV'       g   \)        VR4       V^ ,          p\        VP                  VP                  VP                  RVP.                  R7      P                  4       p\        V\0        4      '       dh   RVR,           VP                  ,           RVP2                  RRRVP4                  RVP6                  RVP8                  R	VP:                  RVP<                  /pM8RVR,           VP                  ,           R^ RRRVP>                  R	VP:                  /pV'       g   R Uu/ uF  qÿW,          bK  	  ppVf   Q hV# u up
i u up
i u upi )aÛ  
Get information about a file or directory.

For more details, refer to [fsspec documentation](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem.info).

> [!WARNING]
> Note: When possible, use `HfApi.get_paths_info()` or `HfApi.repo_info()`  for better performance
> (or `HfApi.get_bucket_paths_info()` or `HfApi.bucket_info()` for buckets)

Args:
    path (`str`):
        Path to get info for.
    refresh (`bool`, *optional*):
        If True, bypass the cache and fetch the latest data. Defaults to False.
    revision (`str`, *optional*):
        The git revision to get info from.

Returns:
    `dict[str, Any]`: Dictionary containing file information (type, size, commit info, etc.).

rñ   r�   NFr  r  r…   r  r  )r\   r_   r"  )ÚoidÚtitlerr  )r
  )r  r_   r\   rX   )rb   r^   r>   r  r  r  r  r  éÿÿÿÿ)r  r  r…   ) rÝ   rD   r[   r�   r@   rã   rR   r¥   Úlist_repo_commitsr]   r\   r_   r&   Ú	commit_idrx  Ú
created_atri   râ   r  r¨   rÏ   Úget_paths_inforb   r^   r'   r  r  r  r  r  r  r"  )rC   r@   r
  r_   rx   rä   r�   r  r  r<  r  Úout1Ú
paths_infor1  r-  Úks   &&&&,           r9   rW  ÚHfFileSystem.infol  s�  € ð, ×)Ñ)¨$Ð)ÓBˆØ×&Ñ&Ó(ˆØ—j‘jØ¨t×/?Ñ/?Ò/K˜4×+Ò+ÐQVó
ˆð ×!×!Ð!ð ˜Ø˜Ø˜ðˆCô
 ˜-Ô)K×LÒLØ%)��MÑ"Ü˜-Ô)K×LÒL×Q\Ø"Ÿi™i×9Ñ9Ø!×)Ñ)°]×5LÑ5LÐWd×WmÑWmð :ó àõ�ðØðà˜tØ!¤>Ø'×1Ñ1¸×9JÑ9JÐQ\×QgÑQgô$ñ�ùô ˜Ô'E×FÒFØŸ,™, tÓ,ˆKà�G‰G�KˆGÔ1Ø#Ÿ}™}¨[Ö9ÓOÑ9˜!¸v½YÈ$Ñ=N—A�AÑ9ˆDÐOßÜ% d¨DÔ1Ø�q•'ŠCàˆCØŸ,™, tÓ,ˆKß ;·m±mÔ#Cà—‘˜Ô$ØŸm™mÔ+à#'§=¡=°Ö#=ÓSÑ#=˜aÀ6ÅÈdÑARŸ˜Ñ#=�ÐSßÜ)¨$°Ô5Ø˜1•g�ß˜#š+¯+¨+¿#¸#À#ÀmÕBTÓB\Ø!ŸY™Y×5Ñ5Ø!×)Ñ)Ø!×.Ñ.Ø&Ø*×3Ñ3Ø+×5Ñ5ð 6ó �
÷ "Ü)¨$°Ô5Ø& q�M�	Ü>Ø!×+Ñ+Ø!×)Ñ)Ø!×*Ñ*Ø!#Ø"/×"=Ñ"=ô÷ ‘)“+ð ô ˜i¬×2Ò2à 	¨C¥°)·.±.Õ @Ø 	§¡Ø Ø! 9×#4Ñ#4Ø˜yŸ}™}Ø" I×$6Ñ$6Ø% y×'<Ñ'<Ø" I×$6Ñ$6ð	‘Cð  	¨C¥°)·.±.Õ @Ø Ø Ø! 9×#4Ñ#4Ø% y×'<Ñ'<ð�C÷ #Ù.FÓGÑ.F¨˜c�fš9Ñ.F�CÐGØŠÐˆØˆ
ùòq Pùò TùòT Hs   Å)O/Å=O/ÈO4ÈO4ÏO9c                ó¤   €  VP                  RR4      '       d   V P                  V4       V P                  ! V3/ VB  R#   \         d     R# i ; i)aq  
Check if a file exists.

For more details, refer to [fsspec documentation](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem.exists).

> [!WARNING]
> Note: When possible, use `HfApi.file_exists()` for better performance.

Args:
    path (`str`):
        Path to check.

Returns:
    `bool`: True if file exists, False otherwise.
r
  FT)r[   rå   rW  ÚOSError)rC   r@   rx   s   &&,r9   ÚexistsÚHfFileSystem.existsÚ  sL   € ð 	Ø�z‰z˜) U×+Ò+Ø×%Ñ% dÔ+à�IŠI�dÑ%˜fÒ%ÙøÜô 	Úð	ús   ‚A  š$A  Á AÁAc                ó^   €  V P                  V4      R,          R8H  #   \         d     R# i ; i)a)  
Check if a path is a directory.

For more details, refer to [fsspec documentation](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem.isdir).

Args:
    path (`str`):
        Path to check.

Returns:
    `bool`: True if path is a directory, False otherwise.
r…   r  F©rW  rƒ  ©rC   r@   s   &&r9   r  ÚHfFileSystem.isdiró  s1   € ð	Ø—9‘9˜T“? 6Õ*¨kÑ9Ð9øÜô 	Úð	úó   ‚ �,«,c                ó^   €  V P                  V4      R,          R8H  #   \         d     R# i ; i)a   
Check if a path is a file.

For more details, refer to [fsspec documentation](https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.spec.AbstractFileSystem.isfile).

Args:
    path (`str`):
        Path to check.

Returns:
    `bool`: True if path is a file, False otherwise.
r…   r  Fr‡  rˆ  s   &&r9   ÚisfileÚHfFileSystem.isfile  s1   € ð	Ø—9‘9˜T“? 6Õ*¨fÑ4Ð4øÜô 	Úð	úrŠ  c                ó&   <€ V ^8„  d   QhRS[ RS[ /# rL  r5   )r7   r8   s   "€r9   r:   r¢     s   ø€ ÷ ñ ™ð ¡ñ r<   c                ó�  € V P                  V4      p\        V\        4      '       d3   V P                   RVP                   R\        VP                  4       2pMB\        VP                  VP                  VP                  VP                  V P                  R7      pV P                  V4      '       d   VP                  RR^4      pV# )z¥
Get the HTTP URL of the given path.

Args:
    path (`str`):
        Path to get URL for.

Returns:
    `str`: HTTP URL to access the file or directory on the Hub.
z	/buckets/z	/resolve/)r\   r_   rš   z/tree/)rÝ   rã   ri   rš   rk   r   r@   r    r]   rb   r\   r_   r  Úreplace)rC   r@   rä   Úurls   &&  r9   r‘  ÚHfFileSystem.url  s­   € ð ×)Ñ)¨$Ó/ˆÜ�mÔ%C×DÒDØ—]‘]�O 9¨]×-DÑ-DÐ,EÀYÌuÐUb×UgÑUgÓOhÐNiÐj‰CäØ×%Ñ%Ø×*Ñ*Ø'×1Ñ1Ø&×/Ñ/ØŸ™ôˆCð �:‰:�d×ÒØ—+‘+˜k¨8°QÓ7ˆCØˆ
r<   c                ó   <€ V ^8„  d   QhRR/# ©r3   r4   NrG   )r7   r8   s   "€r9   r:   r¢   1  s   ø€ ÷ < ñ < Ð\`ñ < r<   c                ó@  <€ VP                  R4      p\        VP                  4       4      R0,
          p\        V\        \
        34      '       d   \        V4      ^ 8”  d   \        SV `   ! W3RVRV/VB # \        V4      '       d   TpM1V P                  V4      '       d   \        P                  ! VRR7       R# \        V\        \        34      '       d6   \        P                  ! \        P                  P!                  V4      RR7       RpVf   \#        VR4      pRpVP%                  4       p	V P'                  WR	7      p
V P)                  WR	7      R
,          pVP+                  V4        \-        V P/                  V
P1                  4       4      TTT^ V P2                  P5                  4       \        V\
        4      '       d   VP6                  MRR7       VP9                  V	4       V'       d   VP;                  4        R# R#   T'       d   TP;                  4        i i ; i)aü  
Copy single remote file to local.

> [!WARNING]
> Note: When possible, use `HfApi.hf_hub_download()` or `HfApi.download_bucket_files` for better performance.

Args:
    rpath (`str`):
        Remote path to download from.
    lpath (`str`):
        Local path to download to.
    callback (`Callback`, *optional*):
        Optional callback to track download progress. Defaults to no callback.
    outfile (`IO`, *optional*):
        Optional file-like object to write to. If provided, `lpath` is ignored.

r_   ÚcallbackÚoutfileT)Úexist_okNFÚwbrñ   r  )r‘  Ú	temp_fileÚdisplayed_filenameÚexpected_sizeÚresume_sizeÚheadersÚ	_tqdm_bar)r[   ÚsetÚkeysrã   r   r   rÒ   rs   Úget_filer   r  r&  Úmakedirsr6   r   r@   Údirnamere  ÚtellrÝ   rW  Úset_sizer!   r‘  rD   r¥   Ú_build_hf_headersÚtqdmÚseekÚclose)rC   ÚrpathÚlpathr–  r—  rx   r_   Úunhandled_kwargsÚ
close_fileÚinitial_posÚresolve_remote_pathrœ  ry   s   &&&&&,      €r9   r¢  ÚHfFileSystem.get_file1  s´  ø€ ð$ —:‘:˜jÓ)ˆÜ˜vŸ{™{›}Ó-°°Õ<ÐÜ˜(¤\´<Ð$@×AÒAÄSÐIYÓEZÐ]^ÔE^ô ‘7Ò# EÑ_¸8Ð_ÈWÐ_ÐX^Ñ_Ð_ô �e×ÒØ‰GØ�Z‰Z˜×ÒÜ�KŠK˜¨Õ-Ùä�eœc¤4˜[×)Ò)Ü�KŠKœŸ™Ÿ™¨Ó.¸Õ>ð ˆ
ØŠ?Ü˜5 $Ó'ˆGØˆJØ—l‘l“nˆð #×/Ñ/°Ð/ÓIÐØŸ	™	 %˜	Ó;¸FÕCˆØ×Ñ˜-Ô(ð	 ÜØ—H‘HÐ0×:Ñ:Ó<Ó=Ø!Ø#(Ø+ØØŸ	™	×3Ñ3Ó5Ü+5°hÄ×+MÒ+M˜(Ÿ-š-ÐSWõð �L‰L˜Ô%÷ Ø—‘–ñ ø�zØ—‘•ð ús   Å,A:H ÈHc                ó   € \        R4      h)z¥A context within which files are committed together upon exit

Requires the file class to implement `.commit()` and `.discard()`
for the normal and exception cases.
ú(Transactional commits are not supported.©rÉ   rB   s   &r9   ÚtransactionÚHfFileSystem.transactiono  s   € ô "Ð"LÓMÐMr<   c                ó   € \        R4      h)z@Begin write transaction for deferring files, non-context versionr³  r´  rB   s   &r9   Ústart_transactionÚHfFileSystem.start_transactionz  s   € ô "Ð"LÓMÐMr<   c                óp   € \         \        V 4      V P                  V P                  V P	                  4       33# rr   )Úmake_instancer…   r‹   rŒ   r‡   rB   s   &r9   Ú
__reduce__ÚHfFileSystem.__reduce__€  s9   € äÜ�‹JØ×ÑØ× Ñ Ø×$Ñ$Ó&ð	
ð 
ð 	
r<   c                ó„   € R \        V P                  4      R\        V P                  4      R\        V P                  4      /# )r¨   r¦   r§   )r   r¨   r¦   r§   rB   s   &r9   r‡   Ú HfFileSystem._get_instance_state‰  s:   € àœ §¡Ó/Ø-¬x¸×8\Ñ8\Ó/]Ø"¤H¨T×-FÑ-FÓ$Gð
ð 	
r<   )r¥   r§   r¦   rœ   r¨   rš   r�   r›   rr   )rb  NN)FNN)TFN)FFNNN)NFFFN)FN)(rH   rI   rJ   rK   rL   Úroot_markerÚprotocolrt   Úclassmethodr~   r¾   rÃ   rÝ   rå   rí   rù   r  r  r  r*  rN  rR  rZ  rm  rs  rW  r„  r  rŒ  r‘  r   r¢  Úpropertyrµ  r¸  r¼  r‡   rN   rO   r•   r–   s   @@r9   r˜   r˜   Œ   sl  ù‡ € ñ@ðD €KØ€Hð<ð  $ð<ð $(ð	<ð
 "&ð<ð $(÷<õ <ð2 ÷	ó ð	÷Tð T÷&4ð 4÷M
ò M
÷^Qò Q÷BXò X÷$>ò >÷ 0>ò 0>÷d);ò );÷VKò K÷Z&ð &÷P7ó 7÷ ?õ ?÷$;7ò ;7÷z:?ò :?÷xhð h÷2lò lò\ò2ò$÷$ð ð4 /@È÷ < õ < ð| ñNó ðNòNò
÷
ò 
r<   r˜   )Ú	metaclassc                   óª   a a€ ] tR tRt oRV3R lV 3R llltV 3R ltV3R lR ltV3R lR ltRV3R	 lR
 lltRV 3R llt	V3R lR lt
RtVtV ;t# )ré   i‘  c                ó:   <€ V ^8„  d   QhRS[ RS[RS[R,          /# )r3   Úfsr@   r_   N)r˜   r6   )r7   r8   s   "€r9   r:   ÚHfFileSystemFile.__annotate__’  s&   ø€ ÷ 
ñ 
™<ð 
©sð 
¹cÀD½jñ 
r<   c                ó  <€  VP                  W#R 7      V n        \        ST `  ! YP                  P                  4       3/ TB  T  R#   \         d-   pRTP                  RR4      9   d   \        T R24      Thh Rp?ii ; i)rñ   Úwrè   rX   úB.
Make sure the repository and revision exist before writing data.N)rÝ   rä   rX  r[   rs   rt   rD   )rC   rÇ  r@   r_   rx   r½   ry   s   &&&&, €r9   rt   ÚHfFileSystemFile.__init__’  s†   ø€ ð	Ø!#§¡° Ó!IˆDÔô 	‰Ò˜×/Ñ/×9Ñ9Ó;ÑF¸vÒFÛøô !ô 	Ø�f—j‘j ¨Ó,Ô,Ü'Ø�cÐ\Ð]óàðð ûð	ús   ƒA ÁA>Á'A9Á9A>c                óH   <€ \        V R 4      '       g   R# \        SV `	  4       # ©rä   N)Úhasattrrs   Ú__del__©rC   ry   s   &€r9   rÐ  ÚHfFileSystemFile.__del__ž  s    ø€ Ü�t˜_×-Ò-áÜ‰w‰Ó Ð r<   c                ó,   <€ V ^8„  d   QhRS[ RS[ RS[/# )r3   ÚstartÚendr4   )r¡   Úbytes)r7   r8   s   "€r9   r:   rÈ  ¤  s"   ø€ ÷ ñ ¡#ð ©Cð ±Eñ r<   c                óò   € R RV RV^,
           2/V P                   P                  P                  4       CpV P                  4       p\	        RWC\
        P                  R7      p\        V4       VP                  # )Úrangeúbytes=Ú-ÚGET©rž  r¹   )	rÇ  r¥   r§  r‘  r+   r   ÚHF_HUB_DOWNLOAD_TIMEOUTr*   rl  )rC   rÔ  rÕ  rž  r‘  Úrs   &&&   r9   Ú_fetch_rangeÚHfFileSystemFile._fetch_range¤  sk   € à�v˜e˜W A c¨A¥g YÐ/ð
à�g‰g�l‰l×,Ñ,Ó.ð
ˆð �h‰h‹jˆÜ˜ ¼i×>_Ñ>_Ô`ˆÜ˜AÔØ�y‰yÐr<   c                ó   <€ V ^8„  d   QhRR/# r”  rG   )r7   r8   s   "€r9   r:   rÈ  ®  s   ø€ ÷ Sñ S $ñ Sr<   c                ó@   € \         P                  ! R RR7      V n        R# )zhffs-F)r  ró   N)ÚtempfileÚNamedTemporaryFilerš  rB   s   &r9   Ú_initiate_uploadÚ!HfFileSystemFile._initiate_upload®  s   € Ü!×4Ò4¸GÈEÔRˆŽr<   c                ó$   <€ V ^8„  d   QhRS[ RR/# )r3   Úfinalr4   N)r    )r7   r8   s   "€r9   r:   rÈ  ±  s   ø€ ÷ ñ ¡4ð °Dñ r<   c                óh  € V P                   P                  ^ 4       V P                   P                  4       pV P                  P	                  V4       V'       EdÙ   V P                  P                  4        \        V P                  \        4      '       dh   V P                  P                  P                  V P                  P                  V P                  P                  V P                  P                  3.R7       M×V P                  P                  P                  V P                  P                  V P                  P                   V P                  P"                  V P                  P$                  V P                  P&                  V P                  P(                  V P*                  P-                  R4      V P*                  P-                  R4      R7       \.        P0                  ! V P                  P                  4       V P                  P3                  V P                  P5                  4       R7       R# R# )r   )Úaddrô   rõ   rc  rö   N)Úbufferr©  rf  rš  Úwriterª  rã   rä   ri   rÇ  r¥   r÷   rk   r  r@   rg  rb   r]   r›   r\   r_   rx   r[   r&  Úremoverå   rD   )rC   rè  Úblocks   && r9   Ú_upload_chunkÚHfFileSystemFile._upload_chunk±  s„  € Ø�‰×Ñ˜ÔØ—‘× Ñ Ó"ˆØ�‰×Ñ˜UÔ#ßˆ5Ø�N‰N× Ñ Ô"Ü˜$×,Ñ,Ô.L×MÒMØ—‘—‘×/Ñ/Ø×&Ñ&×0Ñ0¸¿¹×8KÑ8KÈT×M_ÑM_×MdÑMdÐ7eÐ6fð 0õ ð —‘—‘×(Ñ(Ø$(§N¡N×$7Ñ$7Ø!%×!3Ñ!3×!@Ñ!@Ø ×.Ñ.×6Ñ6ØŸ'™'Ÿ-™-Ø"×0Ñ0×:Ñ:Ø!×/Ñ/×8Ñ8Ø#'§;¡;§?¡?Ð3CÓ#DØ'+§{¡{§¡Ð7KÓ'Lð )ô 	ô �IŠI�d—n‘n×)Ñ)Ô*Ø�G‰G×$Ñ$Ø×'Ñ'×1Ñ1Ó3ð %ö ñ% r<   c                ó€  <€ V P                   R8X  dŒ   Ve   VR8X  d�   V P                  ^ 8X  dp   V P                  P                  V P                  R^ R7      ;_uu_ 4       pVP                  4       pV ;P                  \        V4      ,          un        VuuRRR4       # \        SV `  V4      #   + '       g   i     L; i)zäRead remote file.

If `length` is not provided or is -1, the entire file is downloaded and read. On POSIX systems the file is
loaded in memory directly. Otherwise, the file is downloaded to a temporary file and read from there.
rb  N)rœ   ry  )rè   ÚlocrÇ  re  r@   rf  rÒ   rs   )rC   Úlengthrk  r  ry   s   &&  €r9   rf  ÚHfFileSystemFile.readË  s‡   ø€ ð �9‰9˜Ô &¢.°F¸b´LÀdÇhÁhÐRSÄmØ—‘—‘˜dŸi™i¨¸!�×<Ô<ÀØ—f‘f“h�Ø—’œC ›HÕ$•Ø÷ =Ò<ô ‰w‰|˜FÓ#Ð#÷	 =×<ús   Á4B-Â-B=	c                ó    <€ V ^8„  d   QhRS[ /# r2   r5   )r7   r8   s   "€r9   r:   rÈ  Ø  ó   ø€ ÷ &ñ &‘Sñ &r<   c                óL   € V P                   P                  V P                  4      # rr   ©rÇ  r‘  r@   rB   s   &r9   r‘  ÚHfFileSystemFile.urlØ  ó   € Ø�w‰w�{‰{˜4Ÿ9™9Ó%Ð%r<   )rä   rš  rr   )F©ry  )rH   rI   rJ   rK   rt   rÐ  rß  rå  rï  rf  r‘  rN   rO   r•   r–   s   @@r9   ré   ré   ‘  sH   ù‡ € ÷
õ 
õ!÷ð ÷Sð S÷ò ÷4$÷&÷ &ð &r<   ré   c                   ó®   a a€ ] tR tRt oRV3R lV 3R llltRV3R lR lltRV3R lR lltRV3R lR	 lltV3R
 lR ltV 3R lt	R t
R tRtVtV ;t# )rê   iÜ  c                óL   <€ V ^8„  d   QhRS[ RS[RS[RS[R,          RS[RS[/# )r3   rÇ  r@   rè   r_   Nrœ   Ú
cache_type©r˜   r6   r¡   )r7   r8   s   "€r9   r:   Ú#HfFileSystemStreamFile.__annotate__Ý  sK   ø€ ÷ !*ñ !*áð!*ñ ð!*ñ ð	!*ñ
 ˜•*ð!*ñ ð!*ñ ñ!*r<   c           	     ó4  <€ V^ 8w  d   \        RV 24      hVR8w  d   \        RV 24      hRV9   d   \        RV R24      h VP                  W$R7      V n        RV P                  P                  4       RR/V n        \        S	V `   ! WP                  P                  4       3RVRVRV/VB  RV n	        V  \        4       V n        RV n        \        4       V n        R#   \         d1   pRTP	                  RR	4      9   d   \        T R
24      Th Rp?L¸Rp?ii ; i)r   z:HfFileSystemStreamFile only supports block_size=0 but got Únonez?HfFileSystemStreamFile only supports cache_type='none' but got rÊ  z;HfFileSystemStreamFile only supports reading but got mode='r@  rñ   rè   rX   rË  Nr  r  rœ   rþ  )rË   rÝ   rä   rX  r[   rD   Údetailsrs   rt   Úresponser   Ú_exit_stackÚ_stream_iteratorÚ	bytearrayÚ_stream_buffer)
rC   rÇ  r@   rè   r_   rœ   rþ  rx   r½   ry   s
   &&&&&&&, €r9   rt   ÚHfFileSystemStreamFile.__init__Ý  sB  ø€ ð ˜Œ?ÜÐYÐZdÐYeÐfÓgÐgØ˜ÔÜÐ^Ð_iÐ^jÐkÓlÐlØ�$Œ;ÜÐZÐ[_ÐZ`Ð`aÐbÓcÐcð	Ø!#§¡° Ó!IˆDÔð  × 2Ñ 2× <Ñ <Ó >ÀÈÐMˆŒÜ‰ÒØ×"Ñ"×,Ñ,Ó.ñ	
Ø59ð	
ØFPð	
Ø]gð	
Økqò	
ð 04ˆŒÙÜ$›;ˆÔà8<ˆÔÜ'›kˆÖøô !ô 	Ø�f—j‘j ¨Ó,Ô,Ü'Ø�cÐ\Ð]óàðô -ûð	ús   ÁC ÃDÃ'&DÄDc                ó&   <€ V ^8„  d   QhRS[ RS[ /# )r3   rò  Úwhence©r¡   )r7   r8   s   "€r9   r:   r      s   ø€ ÷ :ñ :™ð :¡Sñ :r<   c                ój   € V^ 8X  d
   V^8X  d   R# WP                   8X  d
   V^ 8X  d   R# \        R4      h)r   NzCannot seek streaming HF file)rò  rË   )rC   rò  r  s   &&&r9   r©  ÚHfFileSystemStreamFile.seek   s0   € Ø�!Œ8˜ !œÙØ—(‘(Œ?˜v¨œ{ÙÜÐ8Ó9Ð9r<   c                ó    <€ V ^8„  d   QhRS[ /# )r3   ró  r  )r7   r8   s   "€r9   r:   r     s   ø€ ÷ $ñ $™3ñ $r<   c                ó¬  € V P                   f   V P                  4        Rp  V P                   e   V P                  f   R# V P                  V P                  V4      pV ;P                  \        V4      ,          un        V#   \         dH    T P                   e   T P                   P                  4        T'       d   h T P                  4        Rp K±  i ; i)z¾Read the remote file.

If the file is already open, we reuse the connection.
Otherwise, open a new connection and read from it.

If reading the stream fails, we retry with a new connection.
FTr<   )r  Ú_open_connectionr  Ú_read_from_streamrò  rÒ   r·   rª  )rC   ró  Úretried_oncer  s   &&  r9   rf  ÚHfFileSystemStreamFile.read  s®   € ð �=‰=Ò Ø×!Ñ!Ô#àˆØð$Ø—=‘=Ò(¨D×,AÑ,AÒ,IÙØ×,Ñ,¨T×-BÑ-BÀFÓK�Ø—’œC ›HÕ$•Ø�
øÜô $Ø—=‘=Ò,Ø—M‘M×'Ñ'Ô)ßØà×%Ñ%Ô'Ø#“ð$ús   £B Á?B Â:CÂ<CÃCc                ó<   <€ V ^8„  d   QhRS[ S[,          RS[RS[/# )r3   Úiteratorró  r4   )r   rÖ  r¡   )r7   r8   s   "€r9   r:   r   #  s'   ø€ ÷  ñ  ©(±5­/ð  Á3ð  ÑPUñ  r<   c                ó¢  € V^ 8X  d   R# V^ 8  dU   \        V P                  4      pV P                  P                  4        V F  pVP                  V4       K  	  \	        V4      # V\        V P                  4      8:  d*   \	        V P                  RV 4      pV P                  RV1 V# \        V P                  4      pV P                  P                  4        V Fi  pV\        V4      ,
          pV\        V4      8”  d   VP                  V4       K8  VP                  VRV 4       V P                  P                  WFR 4        M	  \	        V4      # )z˜Read up to `length` bytes from stream buffer and stream.

If length < 0, read until EOF.

If EOF is reached before length, fewer bytes may be returned.
r<   N)r  r  rá   r#  rÖ  rÒ   )rC   r  ró  ÚbufÚchunkÚresultÚneeds   &&&    r9   r  Ú(HfFileSystemStreamFile._read_from_stream#  s#  € ð �QŒ;Ùà�AŒ:Ü˜D×/Ñ/Ó0ˆCØ×Ñ×%Ñ%Ô'Û!�Ø—
‘
˜5Ö!ñ "ä˜“:Ðà”S˜×,Ñ,Ó-Ô-Ü˜4×.Ñ.¨w°Ð7Ó8ˆFØ×#Ñ# G V GÐ,ØˆMä˜×+Ñ+Ó,ˆØ×Ñ×!Ñ!Ô#ÛˆEØœC ›HÕ$ˆDØ”c˜%“jÔ Ø—
‘
˜5Ö!à—
‘
˜5  $˜<Ô(Ø×#Ñ#×*Ñ*¨5°¨<Ô8Ùñ ô �S‹zÐr<   c                ó    <€ V ^8„  d   QhRS[ /# r2   r5   )r7   r8   s   "€r9   r:   r   E  rö  r<   c                óL   € V P                   P                  V P                  4      # rr   rø  rB   s   &r9   r‘  ÚHfFileSystemStreamFile.urlE  rú  r<   c                ó|   <€ \        V R 4      '       g   R# V P                  P                  4        \        SV `  4       # rÎ  )rÏ  r  rª  rs   rÐ  rÑ  s   &€r9   rÐ  ÚHfFileSystemStreamFile.__del__H  s2   ø€ Ü�t˜_×-Ò-áØ×Ñ×ÑÔ Ü‰w‰Ó Ð r<   c                ó”   € \         V P                  V P                  V P                  V P                  V P
                  P                  33# rr   )ÚreopenrÇ  r@   rè   Ú	blocksizeÚcacher  rB   s   &r9   r¼  Ú!HfFileSystemStreamFile.__reduce__O  s0   € Ü˜Ÿ™ §¡¨D¯I©I°t·~±~ÀtÇzÁzÇÁÐWÐWÐWr<   c           	     óP  € V P                   P                  4        RV n        V P                  4       pV P                  P
                  P                  4       pV P                  ^ 8”  d   RV P                   R2VR&   V P                  P                  \        RVV\        P                  R7      4      V n         \        V P                  4       T P                  P#                  4       T n        R#   \         d/   pTP                  P                   R8X  d   RT n         Rp?R# h Rp?ii ; i)z%Open a connection to the remote file.NrÙ  rÚ  ÚRangerÛ  rÜ  i   )r  rá   r  r‘  rÇ  r¥   r§  rò  r  Úenter_contextr,   r   rÝ  r  r*   r   Ústatus_codeÚ
iter_bytes)rC   r‘  rž  r½   s   &   r9   r  Ú'HfFileSystemStreamFile._open_connectionR  sì   € ð 	×Ñ×!Ñ!Ô#Ø $ˆÔà�h‰h‹jˆØ—'‘'—,‘,×0Ñ0Ó2ˆØ�8‰8�aŒ<Ø!'¨¯© z°Ð3ˆG�GÑØ×(Ñ(×6Ñ6ÜØØØÜ!×9Ñ9ô	ó
ˆŒð	Ü §¡Ô.ð !%§¡× 8Ñ 8Ó :ˆÖøô ô 	Ø�z‰z×%Ñ%¨Ô,à $�”ÝØûð	ús   Â6C, Ã,D%Ã7"D ÄD Ä D%)r  r  r  r  rä   r  )rb  Nr   r  )r   rû  )rH   rI   rJ   rK   rt   r©  rf  r  r‘  rÐ  r¼  r  rN   rO   r•   r–   s   @@r9   rê   rê   Ü  sN   ù‡ € ÷!*õ !*÷F:ò :÷$ò $÷8 ò  ÷D&ð &õ!òX÷;ò ;r<   rê   c                ó0   € V ^8„  d   QhR\         R\         /# )r3   r_   r4   r5   )r7   s   "r9   r:   r:   q  s   € ÷ ]ñ ]œCð ]¤Cñ ]r<   c                 óT   € \         P                  ! V 4      '       d   V # \        V 4      # rr   )r"   ÚmatchÚ
safe_quoterñ   s   &r9   ra   ra   q  s#   € Ü2×8Ò8¸×BÒBˆ8Ð\Ì
ÐS[ÓH\Ð\r<   c                ó0   € V ^8„  d   QhR\         R\         /# )r3   Úsr4   r5   )r7   s   "r9   r:   r:   u  s   € ÷ ñ ”#ð œ#ñ r<   c                 ó   € \        V R R7      # )rX   )Úsafe)r   )r2  s   &r9   r0  r0  u  s   € Ü�˜ÔÐr<   c                óJ   € V ^8„  d   QhR\         R\        R,          R\        /# )r3   r@   rÕ   Nr4   )r6   r·   r   )r7   s   "r9   r:   r:   y  s&   € ÷ *ñ *¤ð *¬)°dÕ*:ð *¼xñ *r<   c                 óÄ   € T p\        V\        4      '       d   V  R 2pM7\        V\        4      '       d   V  R2pM\        V\        4      '       d   V  R2p\	        V4      Vh)z (repository not found)z (revision not found)z (invalid repository id))rã   r   r   r)   rX  )r@   rÕ   Úmsgs   && r9   rÏ   rÏ   y  se   € Ø
€CÜ�#Ô.×/Ò/Ø�Ð-Ð.‰Ü	�CÔ.×	/Ò	/Ø�Ð+Ð,‰Ü	�CÔ*×	+Ò	+Ø�Ð.Ð/ˆÜ
˜CÓ
  cÐ)r<   c          
      óT   € V ^8„  d   QhR\         R\        R\        R\        R\        /# )r3   rÇ  r@   rè   rœ   rþ  rÿ  )r7   s   "r9   r:   r:   „  s7   € ÷ Rñ RŒ|ð R¤3ð R¬cð R¼sð RÔPSñ Rr<   c                 ó(   € V P                  WW4R 7      # ))rè   rœ   rþ  )re  )rÇ  r@   rè   rœ   rþ  s   &&&&&r9   r#  r#  „  s   € Ø�7‰7�4¨zˆ7ÓQÐQr<   c                 ó`   € V ! V/ VB pVP                  4        F  w  rV\        WEV4       K  	  V# rr   )rˆ   r‰   )rv   rw   rx   r‘   rÇ  r’   r“   s   &&&&   r9   r»  r»  ˆ  s6   € Ù	ˆdÐ	�fÑ	€BØ+×1Ñ1Ö3ÑˆÜ�˜+Ö&ñ 4à€Ir<   c                ó@   € V ^8„  d   Qh/ ^ \         9   d
   \        ;R&   # )r3   Ú_cached_base)Ú__conditional_annotations__r   )r7   s   "r9   r:   r:      s   € ‡	�	÷f 4Ò 3ŒcÑ 3òg 
r<   )Xr=  r&  rã  r   Úcollectionsr   Úcollections.abcr   r   Ú
contextlibr   Úcopyr   Údataclassesr   r	   r
   Ú	itertoolsr   Úpathlibr   r   Útypingr   r   r   Úurllib.parser   r   ÚfsspecÚhttpxÚfsspec.callbacksr   r   r   Úfsspec.configr   Úfsspec.utilsr   rX   r   Ú_commit_apir   r   Úerrorsr   r   r   r   r   Úfile_downloadr    r!   Úhf_apir"   r#   r$   r%   r&   r'   r(   Úutilsr)   r*   r+   r,   r-   Úutils.insecure_hashlibr.   r0   rR   ri   r…   ÚAbstractFileSystemr<  rp   r˜   ÚspecÚAbstractBufferedFileré   rê   ra   r0  rÏ   r#  r»  Úhffsr:   )r=  s   @r9   Ú<module>rV     sK  øðß 	€	Û Û Ý ß .Ý  Ý ß (Ý Ý ß 'ß 'Ñ 'ß 'ã Û ß JÑ JÝ &Ý #å ß C÷õ ÷ 0ß v× vÑ vß jÕ jÝ 'ð ÷6ð 6ó ð6ð ô&Ð)Aó &ó ð&ð0 ô0Ð%=ó 0ó ð0ñ ˜×2Ñ2Ó3€Ó 3ô2ˆlô 2ôjB
�6×,Ñ,¸õ B
ôJ H&�v—{‘{×7Ñ7ô H&ôVR;˜VŸ[™[×=Ñ=ô R;õj]õõ*õRòñ ƒ~‚r<   