+
    £÷Îj,û  ã                   óP  a € R2 ta0 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. ^RI/H0t0 ^RI1H2t2H3t3H4t4H5t5H6t6 ^RI7H8t8H9t9H:t: ^RI;H<t<H=t=H>t>H?t?H@t@ ^RIAHBtBHCtCHDtDHEtEHFtFHGtG ^RIHHItI ^RIJHKtKHLtL ^RIMHNtN ] ! R R4      4       tO] ! R R]O4      4       tP] ! R R]O4      4       tQ]R! ]P¦                  4      tT] ^ k  ! R  R!]T4      tU ! R" R#]P¦                  ]UR$7      tV ! R% R&]P®                  P°                  4      tY ! R' R(]P®                  P°                  4      tZR) R* lt[R+ R, lt\R- R. lt]R/ R0 lt^R1 t_]V! 4       t`R# )3é    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)Ú
BucketFileÚBucketFolder)ÚCommitOperationCopyÚCommitOperationDelete)Ú_validate_relative_filename)ÚBucketNotFoundErrorÚEntryNotFoundErrorÚHfHubHTTPErrorÚRepositoryNotFoundErrorÚRevisionNotFoundError)Ú
hf_hub_urlÚhttp_getÚxet_get)ÚSPECIAL_REFS_REVISION_REGEXÚHfApiÚLastCommitInfoÚRepoFileÚ
RepoFolder)ÚHFValidationErrorÚXetFileDataÚhf_raise_for_statusÚhttp_backoffÚhttp_stream_backoffÚparse_hf_uri)Úis_xet_available)ÚXetTokenTypeÚxet_connection_info_refresh_url)Ú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   "€ÚT/opt/data/home/.local/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   &r?   Ú	unresolveÚ"HfFileSystemResolvedPath.unresolve/   s&   € Ø—)‘)�˜A˜dŸi™i˜[Ð)×0Ñ0°Ó5Ð5rB   c                ó2   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   # )r9   rE   rF   r;   )r=   r>   s   "€r?   r@   rA   (   s   ø‡ ‚ ñ �Iñ	 ñ
 �Iò rB   © N)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rJ   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__©r>   s   @r?   r6   r6   (   s   ø‡ € ái÷
6ð 6÷ ƒ rB   r6   c                   ón   a € ] tR t^3t 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_revisionrE   ÚrevisionÚDEFAULT_REVISIONÚsafe_revisionÚpath_in_reporF   )rI   Ú	repo_paths   & r?   Ú__post_init__Ú0HfFileSystemResolvedRepositoryPath.__post_init__A   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Ø×%Ñ%ˆŽ	rB   c                ó|   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ R,          ;R&   # )	r9   rb   rc   re   rh   rE   rF   Nrd   r;   )r=   r>   s   "€r?   r@   Ú/HfFileSystemResolvedRepositoryPath.__annotate__3   sa   ø‡ ‚ ñ �Nñ	 ñ
 �Lñ ñ �Mñ ñ Ññ ñ Ñ!ñ ñ Ñ!ñ ñ ˜•:Ñ?ò rB   )rF   rE   )rN   rO   rP   rQ   rR   r	   rE   rF   rd   rj   rS   rT   rU   rV   s   @r?   rX   rX   3   s8   ø‡ € áVñ ˜5Ô!€DÙ˜5Ô!€Dñ !&¨d¸Ô ?€Mò&÷ ƒ rB   rX   c                   óH   a € ] tR t^Lt 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.FrY   c                ó6   € R V P                   ,           V n        R# )zbuckets/N)Ú	bucket_idrE   rH   s   &r?   rj   Ú,HfFileSystemResolvedBucketPath.__post_init__S   s   € Ø §¡Õ/ˆŽ	rB   c                ó2   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   # )r9   rq   rE   r;   )r=   r>   s   "€r?   r@   Ú+HfFileSystemResolvedBucketPath.__annotate__L   s   ø‡ ‚ ñ �Nñ	 ñ
 Ñ!ò rB   )rE   N)rN   rO   rP   rQ   rR   r	   rE   rj   rS   rT   rU   rV   s   @r?   ro   ro   L   s    ø‡ € áRñ ˜5Ô!€Dò0÷ ƒ rB   ro   c                   ó<   a a€ ] tR t^[t 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   &*,€r?   rz   Ú_Cached.__init__k   s   ø€ ä‰Ò˜$Ð) &Ò)ð ˆŽ
rB   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Úcachabler{   Ú_latestÚtypeÚ__call__Ú_get_instance_stateÚitemsÚsetattrÚ
_fs_token_Ústorage_argsÚstorage_options)
r|   r}   r~   ÚskipÚfs_tokenÚfs_token_main_threadÚobjÚinstance_stateÚattrÚstate_values
   &*,       r?   rŒ   Ú_Cached.__call__s   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Ñ$ØˆJrB   rM   )
rN   rO   rP   rQ   rR   rz   rŒ   rT   rU   Ú__classcell__©r   r>   s   @@r?   rv   rv   [   s   ù‡ € ñõ÷ò rB   rv   c                   óL  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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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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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V3R) lR* ltRAV3R+ lR, lltR- tR. tR/ tV3R0 lR1 ltV3R2 lR3 ltR]R3V3R4 lV 3R5 lllt ]!R6 4       t"R7 t#R8 t$R9 t%R:t&Vt'V ;t(# )BÚ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)
```
r^   Ú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,          /# )r9   r    Nr¡   r¢   r£   ©r<   ÚboolÚint)r=   r>   s   "€r?   r@   ÚHfFileSystem.__annotate__Ö   sJ   ø€ ÷ <ñ <ñ ˜•*ð<ñ ‘c�z˜DÕ ð	<ñ
 ˜$•Jð<ñ ˜D•[ñ<rB   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)ry   rz   r   ÚENDPOINTr    r¡   r'   Ú_apir¢   r£   Ú_repo_and_revision_exists_cacheÚ_bucket_exists_cacheÚdircache)rI   r    r¡   r¢   r£   r}   r’   r   s   &$$$$*,€r?   rz   ÚHfFileSystem.__init__Ö   se   ø€ ô 	‰Ò˜$Ð2 /Ò2Ø ×6Ð6¤I×$6Ñ$6ˆŒØŒ
Ü 8Ô9ˆŒ	Ø$ŒØ&Ôð rtˆÔ,àNPˆÔ!ð :<ˆŽrB   c                ó&   <€ V ^8„  d   QhRS[ RS[/# )r9   Úthreading_identr:   )r§   r<   )r=   r>   s   "€r?   r@   r¨   ð   s   ø€ ÷ 	ñ 	©ð 	Áñ 	rB   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¡   )ra   r   rª   Úsortedr4   r<   ÚencodeÚ	hexdigest)r|   r±   r}   r~   ÚkeyÚtokenize_argsÚhs   &&*,   r?   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,          /# )r9   rb   rc   re   Nr:   ©r<   Útupler¦   Ú	Exception)r=   r>   s   "€r?   r@   r¨   û   sF   ø€ ÷ Tñ TÙðTÙ'*ðTÙ69¸DµjðTá	‰t‘Y Õ%Ð%Õ	&ñTrB   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))re   rb   ÚtimeoutNF©TN)r¬   r«   Ú	repo_infor   ÚHF_HUB_ETAG_TIMEOUTr!   r+   r"   )rI   rb   rc   re   Úes   &&&& r?   Ú_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,          /# )r9   rq   r:   Nr»   )r=   r>   s   "€r?   r@   r¨     s*   ø€ ÷ 4ñ 4©ð 4±±d¹IÈÕ<LÐ6LÕ0Mñ 4rB   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   )rI   rq   rÃ   s   && r?   Ú_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[,          /# ©r9   rF   re   Nr:   )r<   rX   ro   )r=   r>   s   "€r?   r@   r¨     s4   ø€ ÷ M
ñ M
ÙðM
Ù#&¨¥:ðM
á	+Ñ.LÕ	LñM
rB   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.rD   z-Repository id must be 'namespace/name', got 'z<'. Single-segment ids (e.g. 'gpt2') are no longer supported.)rq   rF   Nr_   r^   zRevision specified in path ("z ") and in `revision` argument ("z") are not the same.)rd   )Ú_strip_protocolÚNotImplementedErrorÚcountÚ
ValueErrorr0   r   ÚHF_PROTOCOLÚ	is_bucketrÉ   ÚidÚ_raise_file_not_foundro   rh   re   ÚsplitÚHF_URI_TYPE_PREFIXESr   rÄ   r‹   rX   Úlenrf   )rI   rF   re   ÚparsedÚbucket_existsÚerrÚpath_without_typerc   Úafter_atÚrevision_in_pathrh   Úrevision_in_path_decodedÚrepo_and_revision_existÚraw_revisionÚraw_after_ats   &&&            r?   Ú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]ô
ð 	
rB   c                ó2   <€ V ^8„  d   QhRS[ R,          RR/# )r9   rF   Nr:   r;   )r=   r>   s   "€r?   r@   r¨   g  s#   ø€ ÷ (Qñ (Q¡S¨4¥Zð (Q¸4ñ (QrB   c                ó<  € V'       gQ   V P                   P                  4        V P                  P                  4        V P                  P                  4        R#  V P	                  V4      pTP                  4       pT'       d0   T P                   P                  TR4       T P                  T4      pK7  TP                  '       g±   \        T\        4      '       ds   T P                  P                  TP                  TP                  R3R4       T P                  P                  TP                  TP                  TP                  3R4       R# T P                  P                  TP                   R4       R# R#   \
         d›    T P                  P                  4        UUu/ uF  w  r4T^ ,          '       g   K  Y4bK  	  Mu uppi uppT n        T P                  P                  4        UUu/ uF  w  r4T^ ,          '       g   K  Y4bK  	  Mu uppi uppT n         R# i ; i)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­   rã   ÚFileNotFoundErrorrŽ   rJ   rƒ   Ú_parentrF   Ú
isinstancerX   rb   rc   re   rq   )rI   rF   Úresolved_pathÚkÚvs   &&   r?   Úinvalidate_cacheÚHfFileSystem.invalidate_cacheg  s·  € ÷ Ø�M‰M×ÑÔ!Ø×0Ñ0×6Ñ6Ô8Ø×%Ñ%×+Ñ+Ö-ðØ $× 1Ñ 1°$Ó 7�ð !×*Ñ*Ó,ˆ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ñ &øô %ô ð &*×%IÑ%I×%OÑ%OÔ%Qô8Ù%Q™T˜QÐUVÐWX×UYÑUY”D�A’DÒ%Qùö8�Ô4ð ?C×>WÑ>W×>]Ñ>]Ô>_Ô,hÑ>_±d°aÐcdÐef×cgÑcg¬T¨QªTÒ>_ùÖ,h�Ô)Úðús6   ÁE6 Å6(HÆF=Æ6F=Æ<-HÇ)HÈHÈHÈHc                ób   <€ V ^8„  d   QhRS[ RS[ RS[R,          RS[ R,          RS[R,          /# )r9   rF   Úmoder¢   Nre   r:   )ÚHfFileSystemFileÚHfFileSystemStreamFile)r<   r§   r   )r=   r>   s   "€r?   r@   r¨   ‘  sR   ø€ ÷ Xñ XáðXñ ðXñ ˜$•Jð	Xñ
 ˜•*ðXñ 
Ð;Õ	<ñXrB   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ñ   re   )r¢   rÏ   ró   rò   )rI   rF   rñ   r¢   re   r~   s   &&&&&,r?   Ú_openÚHfFileSystem._open‘  sr   € ð $.Ò#9‘Z¸t¿¹ˆ
ØÒ!Ø#-�<Ñ Ø�$Œ;Ü%Ð&WÓXÐXØ˜Œ?Ü)¨$Ñ]¸4Ð]È(Ð]ÐV\Ñ]Ð]ä# DÑW°TÐWÀHÐWÐPVÑWÐWrB   c                ó8   <€ V ^8„  d   QhRS[ RS[ R,          RR/# rÌ   r;   )r=   r>   s   "€r?   r@   r¨   £  s&   ø€ ÷ >ñ >™ð >¡s¨T¥zð >Àtñ >rB   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# )©re   ©ÚdeleteÚcommit_messageÚcommit_description)rh   rc   r¡   rb   re   rý   rþ   ©rF   N)rã   rê   ro   r«   Úbatch_bucket_filesrq   rF   Údelete_filerh   rc   r¡   rb   re   ra   rî   rJ   )rI   rF   re   r~   rë   s   &&&, r?   Ú_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ð "ô ð 	×Ñ =×#:Ñ#:Ó#<ÐÖ=rB   c          
      óR   <€ V ^8„  d   QhRS[ RS[RS[R,          RS[ R,          RR/# )r9   rF   Ú	recursiveÚmaxdepthNre   r:   r¥   )r=   r>   s   "€r?   r@   r¨   ³  sE   ø€ ÷ 0>ñ 0>áð0>ñ ð0>ñ ˜•*ð	0>ñ
 ˜•*ð0>ð 
ñ0>rB   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  re   rû   )rh   zDelete Ú zrecursively r^   Nzup to depth rý   rþ   )rc   rb   r¡   Ú
operationsre   rý   rþ   rÿ   )rã   Úexpand_pathrê   ro   ÚisdirrF   r«   r   rq   r   Úcreate_commitrc   rb   r¡   re   ra   rî   rJ   )rI   rF   r  r  re   r~   rë   Úpathsrü   Úpaths_in_reporh   r	  rý   s   &&&&&,       r?   Ú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,          ,          ,          /# )r9   rF   ÚdetailÚrefreshre   Nr:   )r<   r¦   ÚlistÚdictr   )r=   r>   s   "€r?   r@   r¨   å  sL   ø€ ÷ );ñ );Ùð);Ù!%ð);Ù7;ð);ÙORÐUYÍzð);á	‰c‘D™™c˜•NÕ"Õ	#ñ);rB   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  re   NÚname)rã   rJ   Ú_ls_treer   rF   rÕ   ré   rØ   )	rI   rF   r  r  re   r~   rë   ÚoutÚos	   &&&&&,   r?   Ú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,          /# )r9   rF   r  r  re   Nr£   r  r¥   )r=   r>   s   "€r?   r@   r¨     s[   ø€ ÷ Qñ QáðQñ ðQñ ð	Qñ
 ˜•*ðQñ ˜D•[ðQñ ˜•*ñQrB   c                óÈ  € 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/ 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V8w  d1   VPY                  V P                  V4      . 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 P                  P[                  V4       V	'       g   . V P                  V&   V	# u upi u upi u upi u upi )NFrú   r‹   Ú	directoryr  Úlast_commitrD   T)r  r  re   r£   r  )Úprefixr  )r  Úexpandre   rb   ÚsizeÚfileÚblob_idÚlfsÚxet_hashÚsecurityÚmtimeÚuploaded_atÚtree_id).r£   rã   rJ   rE   r®   Úextendr   ÚpopleftÚappendrê   rX   ré   ÚosrF   ÚcommonprefixÚendswithr   rG   rØ   rÐ   Ú
startswithr  rƒ   r  ro   Ú_list_bucket_tree_with_foldersrq   r«   Úlist_repo_treerc   re   rb   r)   r#  r%  r&  r'  r   r(  r   r)  r*  r*   r+  Ú
setdefaultÚupdate)rI   rF   r  r  re   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ÚlistingsÚ
cache_pathÚcache_path_infos   &&&&&&&                   r?   r  ÚHfFileSystem._ls_tree  se  € ð 'Ò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Ø#Ø"+Ø $Ø!)Ø$/Ø!)ð "ó ô	ðV ˆ
ô ˜-Ô)G×HÒHØ×:Ñ:Ø!×+Ñ+Ø(×-Ñ-Ø'ð ;ó ‘ð —y‘y×/Ñ/Ø!×)Ñ)Ø!×&Ñ&Ø'Ø&Ø*×3Ñ3Ø+×5Ñ5ð 0ó �ð 9;ˆHÜ!�	Ø&¨�_¨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ð  Ô%Ø×'Ñ'¨¯©°ZÓ(@À"ÓE×LÑLÈ_Ô]Ø"¤3 t£9 ;Ð/×5Ñ5°cÓ:�ØÒ# u×'8Ø—J‘J˜×/ñS "ðV �M‰M× Ñ  Ô*ßà&(�—‘˜dÑ#Øˆ
ùòm pùò!"ùò %gùò" Vs0   Â2WÃWÅ&WÅ;WÆ7WÇ	WÊ.'WËWc          
      óR   <€ V ^8„  d   QhRS[ RS[ RS[RS[S[S[,          ,          /# )r9   rq   r!  r  r:   )r<   r¦   r   r   r   )r=   r>   s   "€r?   r@   r¨   £  s7   ø€ ÷ -ñ -Ùð-Ù&)ð-Ù6:ð-á	‘*™|Õ+Õ	,ñ-rB   c                óp  € V P                   P                  WVR7      p/ pV'       d   ^VP                  R4      ,           M^ p. pV EFI  pV'       d8   VP                  V8w  d'   VP                  P	                  V R24      '       g   KC  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KL  	  V'       d   V'       g   \        RV RV R24      hV# )	z<Same as `HfApi.list_bucket_tree` but always includes folders)r  rD   Nr  )r‹   rF   r*  zFile not found in bucket 'z': 'Ú')r«   Úlist_bucket_treerÐ   rF   r2  r.  r  r   Úparentsr   r<   r*  r   )rI   rq   r!  r  Úbucket_filesÚbucket_foldersÚ	min_depthr  Úbucket_entryÚparent_bucket_folder_strÚparent_bucket_folderÚbucket_folders   &&&&        r?   r3  Ú+HfFileSystem._list_bucket_tree_with_folders£  s‹  € ð —y‘y×1Ñ1°)ÈyÐ1ÓYˆØ24ˆß-3�A˜Ÿ™ SÓ)Ö)¸ˆ	Ø/1ˆä(ˆL÷ ˜,×+Ñ+¨vÔ5¸l×>OÑ>O×>ZÑ>ZÐ^dÐ]eÐefÐ[g×>hÒ>hÙØ�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ñ )÷D Ÿ#Ü$Ð'AÀ)ÀÈDÐQWÐPXÐXYÐ%ZÓ[Ð[Øˆ
rB   c          	      óp   <€ V ^8„  d   QhRS[ RS[S[S[ S[S[ ,          S[S[ ,          3,          ,          /# ©r9   rF   r:   )r<   r   r¼   r  )r=   r>   s   "€r?   r@   r¨   Ò  s7   ø€ ÷ 7ñ 7™ð 7±(¹5ÁÁdÉ3ÅiÑQUÑVYÕQZÐAZÕ;[Õ2\ñ 7rB   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.
re   rú   N)rã   ra   rJ   ry   Úwalk)rI   rF   r}   r~   r   s   &&*,€r?   rX  Ú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[ ,          /# )r9   rF   r  Nr:   )r<   r§   r  )r=   r>   s   "€r?   r@   r¨   â  s*   ø€ ÷ ?ñ ?™ð ?©¨d­
ð ?ÉÉSÍ	ñ ?rB   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.
re   rú   r  )rã   ra   rJ   ry   Úglob)rI   rF   r  r~   r   s   &&&,€r?   r\  ÚHfFileSystem.globâ  sC   ø€ ð × Ñ  ·
±
¸:Ó0FÐ ÓG×QÑQÓSˆÜ‰wŠ|˜DÑ>¨8Ð>°vÑ>Ð>rB   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,          ,          /# )	r9   rF   r  NÚwithdirsr  r  re   r:   )r<   r§   r¦   r  r  r   )r=   r>   s   "€r?   r@   r¨   ô  st   ø€ ÷ ;7ñ ;7áð;7ñ ˜•*ð;7ñ ð	;7ñ
 ð;7ñ ð;7ñ ˜•*ð;7ñ 
‰c�‘T™#™t¡C© H�~Ð-Õ.Õ	.ñ;7rB   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  re   r$  )rÑ   rã   rJ   r  Úinfor   rè   r³   )rI   rF   r  r_  r  r  re   r~   rë   r  r  r;  Únamesr  s   &&&&&&&,      r?   Ú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/# )r9   Úpath1Úpath2re   Nr:   r;   )r=   r>   s   "€r?   r@   r¨   1  s.   ø€ ÷ :?ñ :?™Sð :?©ð :?¹¸d½
ð :?ÐX\ñ :?rB   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þ   r^   )Úsrc_path_in_reporh   Úsrc_revision)rc   rb   re   rý   rþ   r	  ÚrbN©Úpath_or_fileobjrh   rc   r¡   rb   re   rý   rþ   rÿ   )rã   rê   ro   rÏ   rb   rc   r«   r  re   ra   r   rh   ÚopenÚreadÚupload_filer¡   rî   rJ   )rI   rf  rg  re   r~   Úresolved_path1Úresolved_path2Ú	same_reporý   ÚfÚcontents   &&&&,      r?   Úcp_fileÚHfFileSystem.cp_file1  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[/# rV  )r<   r
   )r=   r>   s   "€r?   r@   r¨   m  s   ø€ ÷ hñ h™Sð h©xñ hrB   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 'rJ  r)  r*  z'Cannot determined 'modified' for path 'z	' (info: Ú))ra  rÏ   Údate)rI   rF   r~   ra  s   &&, r?   ÚmodifiedÚHfFileSystem.modifiedm  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ÐgrB   c          
      óV   <€ V ^8„  d   QhRS[ RS[RS[ R,          RS[S[ S[3,          /# )r9   rF   r  re   Nr:   )r<   r¦   r  r   )r=   r>   s   "€r?   r@   r¨   †  s@   ø€ ÷ lñ l™ð l¡tð l¹sÀT½zð lÑ_cÑdgÑilÐdlÕ_mñ lrB   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   )rb   re   r+  )ÚoidÚtitler{  )r  )r"  re   rb   r^   )rh   rd   rD   r$  r%  r&  r'  r(  éÿÿÿÿ)r  r#  r‹   ) rã   rJ   ra   r£   rF   rê   rX   r«   Úlist_repo_commitsrc   rb   re   r(   Ú	commit_idr�  Ú
created_atro   ré   r  r®   rÕ   Úget_paths_inforh   rd   r)   r#  r%  r&  r'  r   r(  r+  )rI   rF   r  re   r~   rë   r£   r  r   Úparent_pathr  Úout1Ú
paths_infor;  r7  rì   s   &&&&,           r?   ra  ÚHfFileSystem.info†  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)ra   rî   ra  ÚOSError)rI   rF   r~   s   &&,r?   Ú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©ra  rŒ  ©rI   rF   s   &&r?   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   &&r?   ÚisfileÚHfFileSystem.isfile  s1   € ð	Ø—9‘9˜T“? 6Õ*¨fÑ4Ð4øÜô 	Úð	úr“  c                ó&   <€ V ^8„  d   QhRS[ RS[ /# rV  r;   )r=   r>   s   "€r?   r@   r¨   1  s   ø€ ÷ ñ ™ð ¡ñ rB   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/)rb   re   r    z/tree/)rã   rê   ro   r    rq   r   rF   r#   rc   rh   rb   re   r  Úreplace)rI   rF   rë   Úurls   &&  r?   rš  ÚHfFileSystem.url1  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Øˆ
rB   c                ó`   <€ V ^8„  d   QhRS[ S[,          RS[S[S[3,          RS[R,          /# )r9   rë   ra  r:   N)rX   ro   r  r<   r   r,   )r=   r>   s   "€r?   r@   r¨   K  sA   ø€ ÷ Lñ LÙ?ÑB`Õ`ðLÙhlÑmpÑruÐmuÕhvðLá	�tÕ	ñLrB   c                ó`  € \        4       '       d   VP                  R4      ;pf   R# \        V\        4      '       d   VP                  RRrepM.VP
                  VP                  rT\        VP                  RR7      p\        \        P                  VVVV P                  R7      p\        W7R7      # )zlBuild the Xet metadata of a file from its `info()` entry, or return None if it can't be downloaded with Xet.r'  NÚbucketr^   ©Úsafe)Ú
token_typerc   rb   re   r    )Ú	file_hashÚrefresh_route)r1   ra   rê   ro   rq   rc   rb   r   re   r3   r2   ÚREADr    r,   )rI   rë   ra  r'  rc   rb   re   r£  s   &&&     r?   Ú_get_xet_file_dataÚHfFileSystem._get_xet_file_dataK  s›   € ô  ×!Ò!°$·(±(¸:Ó2FÐ&F hÒ%OÙÜ�mÔ%C×DÒDØ+8×+BÑ+BÀHÈd ˆG ð "/×!6Ñ!6¸×8OÑ8O�YÜ˜]×3Ñ3¸"Ô=ˆHÜ7Ü#×(Ñ(ØØØØ—]‘]ô
ˆô  XÔKÐKrB   c                ó   <€ V ^8„  d   QhRR/# ©r9   r:   NrM   )r=   r>   s   "€r?   r@   r¨   `  s   ø€ ÷ L ñ L Ðaeñ L rB   c                óœ  <€ VP                  R4      pV P                  WR7      p\        VP                  4       \	        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 P                  WR7      p	Rp
VEf;   Vf   \        R4      h\        V4      '       d   TpEMV P                  V4      '       d   \         P"                  ! VRR	7       R# \         P"                  ! \         P                  P%                  V4      ;'       g    \         P&                  RR	7       V P)                  Wy4      ;pev   VP+                  V	R
,          4       \-        \/        V4      TV P0                  P3                  4       V	R
,          T\        V\        4      '       d   VP4                  MRR7       R# \7        VR4      pRp
VP9                  4       pV	R
,          pVP+                  V4        \;        V P=                  VP?                  4       4      TTT^ V P0                  P3                  4       \        V\        4      '       d   VP4                  MRR7       VPA                  V4       V
'       d   VPC                  4        R# R#   T
'       d   TPC                  4        i i ; i)a1  
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`, *optional*):
        Local path to download to. Can be omitted if `outfile` is provided.
    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.

re   rú   ÚcallbackÚoutfileFNz-Either `lpath` or `outfile` must be provided.T)Úexist_okr#  )Úincomplete_pathÚxet_file_dataÚheadersÚexpected_sizeÚdisplayed_filenameÚ	_tqdm_barÚwb)rš  Ú	temp_filer±  r°  Úresume_sizer¯  r²  )"ra   rã   r   rF   ÚsetÚkeysrê   r   r   rØ   ry   Úget_filera  rÑ   r   r  r/  ÚmakedirsÚdirnameÚcurdirr¥  Úset_sizer%   r   r«   Ú_build_hf_headersÚtqdmrn  Útellr$   rš  rJ   ÚseekÚclose)rI   ÚrpathÚlpathrª  r«  r~   re   Úresolve_remote_pathÚunhandled_kwargsra  Ú
close_filer®  Úinitial_posr°  r   s   &&&&&,        €r?   r¸  ÚHfFileSystem.get_file`  sC  ø€ ð$ —:‘:˜jÓ)ˆØ"×/Ñ/°Ð/ÓIÐô 	$Ð$7×$<Ñ$<Ô=Ü˜vŸ{™{›}Ó-°°Õ<ÐÜ˜(¤\´<Ð$@×AÒAÄSÐIYÓEZÐ]^ÔE^ô ‘7Ò# EÑ_¸8Ð_ÈWÐ_ÐX^Ñ_Ð_à�y‰y˜ˆyÓ2ˆð ˆ
Ø‹?ØŠ}Ü Ð!PÓQÐQÜ˜%× Ò Ø’Ø—‘˜E×"Ò"Ü—’˜E¨DÕ1Ùä—’œBŸG™GŸO™O¨EÓ2×?Ð?´b·i±iÈ$ÕOØ%)×%<Ñ%<Ð=PÓ%WÐW�MÒdà×%Ñ% d¨6¥lÔ3ÜÜ(,¨U«Ø&3Ø $§	¡	× ;Ñ ;Ó =Ø&*¨6¥lØ+0Ü3=¸hÌ×3UÒ3U (§-¢-Ð[_õñ  Ü˜u dÓ+�Ø!�
Ø—l‘l“nˆð ˜V�ˆØ×Ñ˜-Ô(ð	 ÜØ—H‘HÐ0×:Ñ:Ó<Ó=Ø!Ø#(Ø+ØØŸ	™	×3Ñ3Ó5Ü+5°hÄ×+MÒ+M˜(Ÿ-š-ÐSWõð �L‰L˜Ô%÷ Ø—‘–ñ ø�zØ—‘•ð ús   ÈA:J0 Ê0K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Ï   rH   s   &r?   ÚtransactionÚHfFileSystem.transaction®  s   € ô "Ð"LÓMÐMrB   c                ó   € \        R4      h)z@Begin write transaction for deferring files, non-context versionrÊ  rË  rH   s   &r?   Ústart_transactionÚHfFileSystem.start_transaction¹  s   € ô "Ð"LÓMÐMrB   c                óp   € \         \        V 4      V P                  V P                  V P	                  4       33# rx   )Úmake_instancer‹   r‘   r’   r�   rH   s   &r?   Ú
__reduce__ÚHfFileSystem.__reduce__¿  s9   € äÜ�‹JØ×ÑØ× Ñ Ø×$Ñ$Ó&ð	
ð 
ð 	
rB   c                ó„   € R \        V P                  4      R\        V P                  4      R\        V P                  4      /# )r®   r¬   r­   )r   r®   r¬   r­   rH   s   &r?   r�   Ú HfFileSystem._get_instance_stateÈ  s:   € àœ §¡Ó/Ø-¬x¸×8\Ñ8\Ó/]Ø"¤H¨T×-FÑ-FÓ$Gð
ð 	
rB   )r«   r­   r¬   r¢   r®   r    r£   r¡   rx   )rk  NN)FNN)TFN)FFNNN)NFFFN)FN))rN   rO   rP   rQ   rR   Úroot_markerÚprotocolrz   Úclassmethodr„   rÄ   rÉ   rã   rî   rö   r  r  r  r  r3  rX  r\  rc  rv  r|  ra  r�  r  r•  rš  r¥  r   r¸  ÚpropertyrÌ  rÏ  rÓ  r�   rT   rU   r›   rœ   s   @@r?   rž   rž   �   s|  ù‡ € ñ@ðD €KØ€Hð<ð  $ð<ð $(ð	<ð
 "&ð<ð $(÷<õ <ð2 ÷	ó ð	÷Tð T÷&4ð 4÷M
ò M
÷^(Qò (Q÷TXò X÷$>ò >÷ 0>ò 0>÷d);ò );÷VQò Q÷f-ð -÷^7ó 7÷ ?õ ?÷$;7ò ;7÷z:?ò :?÷xhð h÷2lò lò\ò2ò$÷$ð ÷4Lð Lð* %)Ð3DÈd÷ L õ L ð\ ñNó ðNòNò
÷
ò 
rB   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,          /# )r9   ÚfsrF   re   N)rž   r<   )r=   r>   s   "€r?   r@   ÚHfFileSystemFile.__annotate__Ñ  s&   ø€ ÷ 
ñ 
™<ð 
©sð 
¹cÀD½jñ 
rB   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ñ   r^   zB.
Make sure the repository and revision exist before writing data.N)rã   rë   rè   ra   ry   rz   rJ   )rI   rÞ  rF   re   r~   rÃ   r   s   &&&&, €r?   rz   Ú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)Úhasattrry   Ú__del__©rI   r   s   &€r?   ræ  ÚHfFileSystemFile.__del__Ý  s    ø€ Ü�t˜_×-Ò-áÜ‰w‰Ó Ð rB   c                ó,   <€ V ^8„  d   QhRS[ RS[ RS[/# )r9   ÚstartÚendr:   )r§   Úbytes)r=   r>   s   "€r?   r@   rß  ã  s"   ø€ ÷ ñ ¡#ð ©Cð ±Eñ rB   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-   ru  )rI   rê  rë  r¯  rš  Úrs   &&&   r?   Ú_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ÐrB   c                ó   <€ V ^8„  d   QhRR/# r¨  rM   )r=   r>   s   "€r?   r@   rß  í  s   ø€ ÷ Sñ S $ñ SrB   c                ó@   € \         P                  ! R RR7      V n        R# )zhffs-F)r!  rü   N)ÚtempfileÚNamedTemporaryFiler´  rH   s   &r?   Ú_initiate_uploadÚ!HfFileSystemFile._initiate_uploadí  s   € Ü!×4Ò4¸GÈEÔRˆŽrB   c                ó$   <€ V ^8„  d   QhRS[ RR/# )r9   Úfinalr:   N)r¦   )r=   r>   s   "€r?   r@   rß  ð  s   ø€ ÷ ñ ¡4ð °Dñ rB   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þ   rl  rÿ   N)ÚbufferrÀ  ro  r´  ÚwriterÁ  rê   rë   ro   rÞ  r«   r   rq   r  rF   rp  rh   rc   r¡   rb   re   r~   ra   r/  Úremoverî   rJ   )rI   rþ  Úblocks   && r?   Ú_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ð %ö ñ% rB   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.
rk  N)r¢   r‚  )rñ   ÚlocrÞ  rn  rF   ro  rØ   ry   )rI   Úlengthrt  r  r   s   &&  €r?   ro  Ú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[ /# r8   r;   )r=   r>   s   "€r?   r@   rß    ó   ø€ ÷ &ñ &‘Sñ &rB   c                óL   € V P                   P                  V P                  4      # rx   ©rÞ  rš  rF   rH   s   &r?   rš  ÚHfFileSystemFile.url  ó   € Ø�w‰w�{‰{˜4Ÿ9™9Ó%Ð%rB   )rë   r´  rx   )F©r‚  )rN   rO   rP   rQ   rz   ræ  rõ  rû  r  ro  rš  rT   rU   r›   rœ   s   @@r?   rò   rò   Ð  sH   ù‡ € ÷
õ 
õ!÷ð ÷Sð S÷ò ÷4$÷&÷ &ð &rB   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[/# )r9   rÞ  rF   rñ   re   Nr¢   Ú
cache_type©rž   r<   r§   )r=   r>   s   "€r?   r@   Ú#HfFileSystemStreamFile.__annotate__  sK   ø€ ÷ *ñ *áð*ñ ð*ñ ð	*ñ
 ˜•*ð*ñ ð*ñ ñ*rB   c           	     ó¶  <€ 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
# )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='rJ  rú   r  r#  Nrñ   r¢   r  )rÑ   rã   rë   rJ   Údetailsry   rz   Úresponser   Ú_exit_stackÚ_stream_iteratorÚ	bytearrayÚ_stream_buffer)	rI   rÞ  rF   rñ   re   r¢   r  r~   r   s	   &&&&&&&,€r?   rz   ÚHfFileSystemStreamFile.__init__  sø   ø€ ð ˜Œ?ÜÐYÐZdÐYeÐfÓgÐgØ˜ÔÜÐ^Ð_iÐ^jÐkÓlÐlØ�$Œ;ÜÐZÐ[_ÐZ`Ð`aÐbÓcÐcð  Ÿ_™_¨T˜_ÓEˆÔà × 2Ñ 2× <Ñ <Ó >ÀÈÐMˆŒÜ‰ÒØ×"Ñ"×,Ñ,Ó.ñ	
Ø59ð	
ØFPð	
Ø]gð	
Økqò	
ð 15ˆŒÙÜ$›;ˆÔà8<ˆÔÜ'›kˆÖrB   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# )r9   r  Úwhence©r§   )r=   r>   s   "€r?   r@   r  ;  s   ø€ ÷ :ñ :™ð :¡Sñ :rB   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Ñ   )rI   r  r!  s   &&&r?   rÀ  ÚHfFileSystemStreamFile.seek;  s0   € Ø�!Œ8˜ !œÙØ—(‘(Œ?˜v¨œ{ÙÜÐ8Ó9Ð9rB   c                ó    <€ V ^8„  d   QhRS[ /# )r9   r	  r"  )r=   r>   s   "€r?   r@   r  B  s   ø€ ÷ $ñ $™3ñ $rB   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.
FTrB   )r  Ú_open_connectionr  Ú_read_from_streamr  rØ   r½   rÁ  )rI   r	  Úretried_oncer  s   &&  r?   ro  ÚHfFileSystemStreamFile.readB  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[/# )r9   Úiteratorr	  r:   )r   rì  r§   )r=   r>   s   "€r?   r@   r  ^  s'   ø€ ÷  ñ  ©(±5­/ð  Á3ð  ÑPUñ  rB   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.
rB   N)r  r  rç   r,  rì  rØ   )rI   r,  r	  ÚbufÚchunkÚresultÚneeds   &&&    r?   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ÐrB   c                ó    <€ V ^8„  d   QhRS[ /# r8   r;   )r=   r>   s   "€r?   r@   r  €  r  rB   c                óL   € V P                   P                  V P                  4      # rx   r  rH   s   &r?   rš  ÚHfFileSystemStreamFile.url€  r  rB   c                ó|   <€ \        V R 4      '       g   R# V P                  P                  4        \        SV `  4       # rä  )rå  r  rÁ  ry   ræ  rç  s   &€r?   ræ  ÚHfFileSystemStreamFile.__del__ƒ  s2   ø€ Ü�t˜_×-Ò-áØ×Ñ×ÑÔ Ü‰w‰Ó Ð rB   c                ó”   € \         V P                  V P                  V P                  V P                  V P
                  P                  33# rx   )ÚreopenrÞ  rF   rñ   Ú	blocksizeÚcacher  rH   s   &r?   rÓ  Ú!HfFileSystemStreamFile.__reduce__Š  s0   € Ü˜Ÿ™ §¡¨D¯I©I°t·~±~ÀtÇzÁzÇÁÐWÐWÐWrB   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)rI   rš  r¯  rÃ   s   &   r?   r'  Ú'HfFileSystemStreamFile._open_connection�  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  )rk  Nr   r  )r   r  )rN   rO   rP   rQ   rz   rÀ  ro  r(  rš  ræ  rÓ  r'  rT   rU   r›   rœ   s   @@r?   ró   ró     sM   ù‡ € ÷*õ *÷>:ò :÷$ò $÷8 ò  ÷D&ð &õ!òX÷;ò ;rB   ró   c                ó0   € V ^8„  d   QhR\         R\         /# )r9   re   r:   r;   )r=   s   "r?   r@   r@   ¬  s   € ÷ ^ñ ^œCð ^¤Cñ ^rB   c                 óT   € \         P                  ! V 4      '       d   V # \        V 4      # rx   )r&   ÚsearchÚ
safe_quoterú   s   &r?   rg   rg   ¬  s#   € Ü2×9Ò9¸(×CÒCˆ8Ð]ÌÐT\ÓI]Ð]rB   c                ó0   € V ^8„  d   QhR\         R\         /# )r9   Úsr:   r;   )r=   s   "r?   r@   r@   °  s   € ÷ ñ ”#ð œ#ñ rB   c                 ó   € \        V R R7      # )r^   rŸ  )r   )rH  s   &r?   rF  rF  °  s   € Ü�˜ÔÐrB   c                óJ   € V ^8„  d   QhR\         R\        R,          R\        /# )r9   rF   rÛ   Nr:   )r<   r½   r   )r=   s   "r?   r@   r@   ´  s&   € ÷ *ñ *¤ð *¬)°dÕ*:ð *¼xñ *rB   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+   rè   )rF   rÛ   Úmsgs   && r?   rÕ   rÕ   ´  se   € Ø
€CÜ�#Ô.×/Ò/Ø�Ð-Ð.‰Ü	�CÔ.×	/Ò	/Ø�Ð+Ð,‰Ü	�CÔ*×	+Ò	+Ø�Ð.Ð/ˆÜ
˜CÓ
  cÐ)rB   c          
      óT   € V ^8„  d   QhR\         R\        R\        R\        R\        /# )r9   rÞ  rF   rñ   r¢   r  r  )r=   s   "r?   r@   r@   ¿  s7   € ÷ Rñ RŒ|ð R¤3ð R¬cð R¼sð RÔPSñ RrB   c                 ó(   € V P                  WW4R 7      # ))rñ   r¢   r  )rn  )rÞ  rF   rñ   r¢   r  s   &&&&&r?   r9  r9  ¿  s   € Ø�7‰7�4¨zˆ7ÓQÐQrB   c                 ó`   € V ! V/ VB pVP                  4        F  w  rV\        WEV4       K  	  V# rx   )rŽ   r�   )r|   r}   r~   r—   rÞ  r˜   r™   s   &&&&   r?   rÒ  rÒ  Ã  s6   € Ù	ˆdÐ	�fÑ	€BØ+×1Ñ1Ö3ÑˆÜ�˜+Ö&ñ 4à€IrB   c                ó@   € V ^8„  d   Qh/ ^ \         9   d
   \        ;R&   # )r9   Ú_cached_base)Ú__conditional_annotations__r   )r=   s   "r?   r@   r@      s   € ‡	�	÷n 4Ò 3ŒcÑ 3òo 
rB   )brR  r/  rù  r…   Úcollectionsr   Úcollections.abcr   r   Ú
contextlibr   Úcopyr   Údataclassesr   r	   r
   Ú	itertoolsr   Úpathlibr   r   Útypingr   r   r   Úurllib.parser   r   ÚfsspecÚhttpx2Úfsspec.callbacksr   r   r   Úfsspec.configr   Úfsspec.utilsr   r^   r   Ú_bucketsr   r   Ú_commit_apir   r   Ú_local_folderr   Úerrorsr   r   r    r!   r"   Úfile_downloadr#   r$   r%   Úhf_apir&   r'   r(   r)   r*   Úutilsr+   r,   r-   r.   r/   r0   Úutils._runtimer1   Ú
utils._xetr2   r3   Úutils.insecure_hashlibr4   r6   rX   ro   r‹   ÚAbstractFileSystemrQ  rv   rž   ÚspecÚAbstractBufferedFilerò   ró   rg   rF  rÕ   r9  rÒ  Úhffsr@   )rR  s   @r?   Ú<module>ro     sW  øðß 	€	Û Û Ý ß .Ý  Ý ß (Ý Ý ß 'ß 'Ñ 'ß 'ã Û ß JÑ JÝ &Ý #å ß .ß CÝ 6÷õ ÷ 9Ñ 8ß \Õ \ß w× wÝ ,ß EÝ 'ð ÷6ð 6ó ð6ð ô&Ð)Aó &ó ð&ð0 ô0Ð%=ó 0ó ð0ñ ˜×2Ñ2Ó3€Ó 3ô2ˆlô 2ôj}
�6×,Ñ,¸õ }
ô@"H&�v—{‘{×7Ñ7ô H&ôVN;˜VŸ[™[×=Ñ=ô N;õb^õõ*õRòñ ƒ~‚rB   