+
    ÏÜ³j  ã                  óî   a € 0 t $ ^ RIHt ^ RIt^ RIt^ RIHt ^ RIHt  ^ RI	t
]'       d'   ^ RIHt ^ RIHtHtHt ^RIHt ]]]3,          tR]R	&    ! R
 R4      tR#   ] d    ]'       g   ^ RI
t
 LOi ; i)é    )ÚannotationsN)ÚTYPE_CHECKING)Úatomic_write)ÚIterator)ÚAnyÚLiteralÚ	TypeAlias)ÚCachingFileSystemr	   ÚDetailc                  ó¢   € ] tR t^tRtR R ltR R ltR R ltRR R	 lltR
 R lt	R R lt
R R ltR R ltR R ltR R ltR R ltRtR# )ÚCacheMetadataa  Cache metadata.

All reading and writing of cache metadata is performed by this class,
accessing the cached files and blocks is not.

Metadata is stored in a single file per storage directory in JSON format.
For backward compatibility. No longer supports pickle.
c               ó   € V ^8„  d   QhRR/# )é   Ústoragez	list[str]© )Úformats   "Úf/home/luca/screen-checking/.venv/lib/python3.14/site-packages/fsspec/implementations/cache_metadata.pyÚ__annotate__ÚCacheMetadata.__annotate__"   s   € ÷ /ñ / 	ñ /ó    c                óH   € V'       g   \        R4      hWn        / .V n        R# )z±

Parameters
----------
storage: list[str]
    Directories containing cached files, must be at least one. Metadata
    is stored in the last of these directories by convention.
z3CacheMetadata expects at least one storage locationN)Ú
ValueErrorÚ_storageÚcached_files)Úselfr   s   &&r   Ú__init__ÚCacheMetadata.__init__"   s"   € ÷ ÜÐRÓSÐSàŒØ+-¨$ˆÖr   c               ó    € V ^8„  d   QhRRRR/# )r   ÚfnÚstrÚreturnr   r   )r   s   "r   r   r   1   s   € ÷ ñ ˜ð  ñ r   c                ó8  € \        VR4      ;_uu_ 4       p\        P                  ! V4      pRRR4       XP                  4        F?  p\	        VP                  R4      \        4      '       g   K*  \        VR,          4      VR&   KA  	  V#   + '       g   i     Le; i)z6Low-level function to load metadata from specific fileÚrNÚblocks)ÚopenÚjsonÚloadÚvaluesÚ
isinstanceÚgetÚlistÚset)r   r   ÚfÚloadedÚcs   &&   r   Ú_loadÚCacheMetadata._load1   sg   € ä�"�c�]Œ]˜aÜ—Y’Y˜q“\ˆF÷ à—‘–ˆAÜ˜!Ÿ%™% ›/¬4×0Ô0Ü! ! H¥+Ó.��(“ñ !ð ˆ÷ �]ús   •B	Â	B	c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úmetadata_to_saver   r   r    r!   ÚNoner   )r   s   "r   r   r   :   s!   € ÷ +ñ + fð +°#ð +¸$ñ +r   c                ó–   € \        VRR7      ;_uu_ 4       p\        P                  ! W4       RRR4       R#   + '       g   i     R# ; i)z4Low-level function to save metadata to specific fileÚw)ÚmodeN)r   r&   Údump)r   r3   r   r-   s   &&& r   Ú_saveÚCacheMetadata._save:   s-   € ä˜" 3×'Õ'¨1Ü�IŠIÐ&Ô*÷ (×'×'Ò'ús	   –7·A	c               ó    € V ^8„  d   QhRRRR/# )r   Úwritable_onlyÚboolr!   zIterator[tuple[str, str, bool]]r   )r   s   "r   r   r   ?   s    € ÷ Dñ DØ!ðDà	(ñDr   c              #  óö   "  € \        V P                  4      p\        V P                  4       FF  w  r4W2^,
          8H  pV'       d   V'       g   K"  \        P                  P                  VR4      WE3x € KH  	  R# 5i)zÔYield locations (filenames) where metadata is stored, and whether
writable or not.

Parameters
----------
writable: bool
    Set to True to only yield writable locations.

Returns
-------
Yields (str, str, bool)
ÚcacheN)Úlenr   Ú	enumerateÚosÚpathÚjoin)r   r<   ÚnÚir   Úwritables   &&    r   Ú_scan_locationsÚCacheMetadata._scan_locations?   sW   é € ô �—‘ÓˆÜ# D§M¡MÖ2‰JˆAØ �E‘zˆHß§XÙÜ—'‘'—,‘,˜w¨Ó0°'ÐCÔCó	 3ùs   ‚A
A9Á,A9c               ó$   € V ^8„  d   QhRRRRRR/# )r   rC   r    ÚcfszCachingFileSystem | Noner!   z#Literal[False] | tuple[Detail, str]r   )r   s   "r   r   r   U   s$   € ÷ ñ ØðØ6ðà	,ñr   c                óL  € \        V P                  4       V P                  4       Fû  w  w  r4rVW9  d   K  Wa,          P                  4       pVe‚   VP                  '       d*   VR,          VP
                  P                  V4      8w  d   Ke  VP                  '       d5   \        P                  ! 4       VR,          ,
          VP                  8”  d   K«  \        P                  P                  WGR,          4      p\        P                  P                  V4      '       g   Kø  Ws3u # 	  R# )zÕIf path is in cache return its details, otherwise return ``False``.

If the optional CachingFileSystem is specified then it is used to
perform extra checks to reject possible matches, such as if they are
too old.
ÚuidÚtimer   F)ÚziprH   r   ÚcopyÚcheck_filesÚfsÚukeyÚexpiryrN   rB   rC   rD   Úexists)r   rC   rK   r   ÚbaseÚ_r?   Údetails   &&&     r   Ú
check_fileÚCacheMetadata.check_fileU   sÊ   € ô %(¨×(<Ñ(<Ó(>À×@QÑ@QÖ$RÑ ‰MˆR�qØÔ ÙØ•[×%Ñ%Ó'ˆFàŠØ—?—?�? v¨e¥}¸¿¹¿¹ÀDÓ8IÔ'IáØ—:—:�:¤$§)¢)£+°°vµÕ">ÀÇÁÔ"Káä—‘—‘˜d¨4¥LÓ1ˆBÜ�w‰w�~‰~˜b×!Ô!Ø�zÒ!ñ %Sñ  r   c               ó    € V ^8„  d   QhRRRR/# )r   Úexpiry_timeÚintr!   ztuple[list[str], bool]r   )r   s   "r   r   r   p   s   € ÷ 3ñ 3¨ð 3Ð1Gñ 3r   c                óò  € . pV P                   R,          P                  4       P                  4        F»  w  r4\        P                  ! 4       VR,          ,
          V8”  g   K/  VP	                  RR4      pV'       g   \        RV 24      h\        P                  P                  V P                  R,          V4      pVP                  V4       V P                   R,          P                  V4       K½  	  V P                   R,          '       dU   \        P                  P                  V P                  R,          R4      pV P                  V P                   R,          V4       V P                   R,          '       * pW'3# )zÛRemove expired metadata from the cache.

Returns names of files corresponding to expired metadata and a boolean
flag indicating whether the writable cache is empty. Caller is
responsible for deleting the expired files.
rN   r   Ú z)Cache metadata does not contain 'fn' for r?   éÿÿÿÿ)r   rP   ÚitemsrN   r*   ÚRuntimeErrorrB   rC   rD   r   ÚappendÚpopr9   )r   r\   Úexpired_filesrC   rX   r   Ú
cache_pathÚwritable_cache_emptys   &&      r   Úclear_expiredÚCacheMetadata.clear_expiredp   s   € ð ˆØ ×-Ñ-¨bÕ1×6Ñ6Ó8×>Ñ>Ö@‰LˆDÜ�yŠy‹{˜V F�^Õ+¨kÖ9Ø—Z‘Z  bÓ)�ßÜ&ØCÀDÀ6ÐJóð ô —W‘W—\‘\ $§-¡-°Õ"3°RÓ8�Ø×$Ñ$ RÔ(Ø×!Ñ! "Õ%×)Ñ)¨$Ö/ñ Að ×Ñ˜R× Ô ÜŸ™Ÿ™ d§m¡m°BÕ&7¸ÓAˆJØ�J‰J�t×(Ñ(¨Õ,¨jÔ9à#'×#4Ñ#4°RÕ#8Ô8ÐØÐ2Ð2r   c               ó   € V ^8„  d   QhRR/# ©r   r!   r4   r   )r   s   "r   r   r   Š   s   € ÷ 	1ñ 	1�dñ 	1r   c                ó  € . pV P                  4        F_  w  p p\        P                  P                  V4      '       d#   VP	                  V P                  V4      4       KN  VP	                  / 4       Ka  	  T;'       g    / .V n        R# )z>Load all metadata from disk and store in ``self.cached_files``N)rH   rB   rC   rU   rc   r0   r   )r   r   r   rW   s   &   r   r'   ÚCacheMetadata.loadŠ   sk   € àˆØ×,Ñ,Ö.‰HˆB��1Ü�w‰w�~‰~˜b×!Ò!à×#Ñ# D§J¡J¨r£NÖ3à×#Ñ# BÖ'ñ /ð )×0Ð0¨R¨DˆÖr   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r-   r   rC   r    r!   r4   r   )r   s   "r   r   r   •   s!   € ÷ ñ  cð °ð ¸ñ r   c                óÊ   € V P                   R,          V,          pVR,          RJd<   \        VR,          4      VP                  ,          VP                  8¼  d   RVR&   R# R# R# )z{Perform side-effect actions on closing a cached file.

The actual closing of the file is the responsibility of the caller.
r$   TNr`   )r   r@   Ú	blocksizeÚsize)r   r-   rC   r/   s   &&& r   Úon_close_cached_fileÚ"CacheMetadata.on_close_cached_file•   sT   € ð ×Ñ˜bÕ! $Õ'ˆØˆX�;˜dÓ"¤s¨1¨X­;Ó'7¸!¿+¹+Õ'EÈÏÉÔ'OØˆAˆh‹Kñ (PÑ"r   c               ó    € V ^8„  d   QhRRRR/# )r   rC   r    r!   z
str | Noner   )r   s   "r   r   r   Ÿ   s   € ÷ ñ ˜Sð  Zñ r   c                ó  € V P                  VR4      pV'       g   R# Vw  r4VP                  V P                  R,          4      '       d5   V P                  R,          P	                  V4       V P                  4        V# \        R4      h)z²Remove metadata of cached file.

If path is in the cache, return the filename of the cached file,
otherwise return ``None``.  Caller is responsible for deleting the
cached file.
Nz<Can only delete cached file in last, writable cache locationr`   )rY   Ú
startswithr   r   rd   ÚsaveÚPermissionError)r   rC   ÚdetailsrW   r   s   &&   r   Úpop_fileÚCacheMetadata.pop_fileŸ   st   € ð —/‘/ $¨Ó-ˆßÙØ‰ˆØ�=‰=˜Ÿ™ rÕ*×+Ò+Ø×Ñ˜bÕ!×%Ñ% dÔ+Ø�I‰IŒKð
 ˆ	ô "ØNóð r   c               ó   € V ^8„  d   QhRR/# rk   r   )r   s   "r   r   r   ³   s   € ÷ "1ñ "1�dñ "1r   c                óÊ  € \        V P                  4       V P                  4       EF³  w  w  rr4V'       g   K  \        P                  P                  V4      '       dß   V P                  V4      pVP                  4        F“  w  rgWd9   g   K  VR,          RJ g   WF,          R,          RJ d   RVR&   M+WF,          R,          pVP                  VR,          4       W‡R&   \        VR,          WF,          R,          4      VR&   WF,          R,          VR&   K•  	  VP                  4        F  w  rgWe9  g   K  WuV&   K  	  MTpVP                  4        UU	u/ uF  w  riWiP                  4       bK  	  ppp	VP                  4        F7  p\        VR,          \        4      '       g   K"  \        VR,          4      VR&   K9  	  V P                  WA4       WPP                  R&   EK¶  	  R# u up	pi )zSave metadata to diskr$   TrN   rM   Nr`   )rO   rH   r   rB   rC   rU   r0   ra   ÚupdateÚmaxrP   r(   r)   r,   r+   r9   )
r   r   rW   rG   r?   r   Úkr/   r$   Úvs
   &         r   rw   ÚCacheMetadata.save³   s„  € ä(+¨D×,@Ñ,@Ó,BÀD×DUÑDU×(VÑ$ÑˆR�HßÙä�w‰w�~‰~˜b×!Ò!Ø#Ÿz™z¨"›~�Ø(×.Ñ.Ö0‘D�AØ–zØ˜X�;¨$Ó.°%µ(¸8Õ2DÈÓ2LØ*.˜A˜hšKð &+¥X¨hÕ%7˜FØ"ŸM™M¨!¨H­+Ô6Ø*0˜h™KÜ$'¨¨&­	°5µ8¸FÕ3CÓ$D˜˜&™	Ø#(¥8¨E¥?˜˜%›ñ 1ð  "ŸK™KžM‘D�AØÖ,Ø*+ Q›ò *ð  %�Ø-9×-?Ñ-?Ô-AÔBÑ-A¡T Q�QŸ™›’[Ñ-AˆEÑBØ—\‘\–^�Ü˜a �k¬3×/Ô/Ü"& q¨¥{Ó"3�A�h“Kñ $ð �J‰J�uÔ!Ø$0×Ñ˜bÔ!óA )Wùó6 Cs   ÅGc               ó$   € V ^8„  d   QhRRRRRR/# )r   rC   r    rX   r   r!   r4   r   )r   s   "r   r   r   ×   s!   € ÷ -ñ - ð -¨Vð -¸ñ -r   c                ó0   € W P                   R,          V&   R# )z8Update metadata for specific file in memory, do not saveNr`   )r   )r   rC   rX   s   &&&r   Úupdate_fileÚCacheMetadata.update_file×   s   € à&,×Ñ˜"Õ˜dÓ#r   )r   r   N)F)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r0   r9   rH   rY   rh   r'   rr   rz   rw   r…   Ú__static_attributes__r   r   r   r   r      sE   † ñõ/õõ+÷
Dõ,õ63õ4	1õõõ("1÷H-ñ -r   r   )Ú__conditional_annotations__Ú
__future__r   rB   rN   Útypingr   Úfsspec.utilsr   Úujsonr&   ÚImportErrorÚcollections.abcr   r   r   r	   Úcachedr
   Údictr    r   Ú__annotations__r   )r�   s   @r   Ú<module>r—      sg   øðß "Ð "ã 	Û Ý  å %ðÛ÷
 Ý(ß.Ñ.å)à˜S #˜X�€FˆIÓ&÷A-ó A-øð ô ßÛùðús    A ÁA4Á-A4Á3A4