+
    ‘°³jw  ã                  óX  a € 0 t $ ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIHtH	t	H
t
 ^ RIHt ^ RIHt R R ltR R	 ltR
 R ltR R ltRR/R R llt]P(                  R8g  ;'       d    ]P*                  ]P,                  9   tR]R&   ]P*                  ]P2                  9   tR]R&   . ROtR# )é    )ÚannotationsN)ÚEACCESÚEIOÚEISDIR)ÚPath)ÚFinalc               ó$   € V ^8„  d   QhRRRRRR/# )é   ÚfdÚintÚdataÚbytesÚreturnÚNone© )Úformats   "ÚO/home/luca/screen-checking/.venv/lib/python3.14/site-packages/filelock/_util.pyÚ__annotate__r      s!   € ÷ (ñ (�#ð (˜Uð ( tñ (ó    c                ó’   € \        V4      pV'       d4   \        P                  ! W4      ;p^ 8X  d   \        \        R4      hW#R pK;  R# )aC  
Write the whole buffer to *fd*, looping over the short writes ``os.write`` is allowed to make.

A marker written with a bare ``os.write`` can land partially: a peer reading it mid-write parses a truncated record
as malformed or as a foreign holder. Looping until the buffer drains keeps the record atomic in the process and
kernel view. No ``fsync``: filelock needs a complete record, not crash-durable storage.

:param fd: file descriptor open for writing.
:param data: bytes to write in full.

:raises OSError: if a write reports zero progress before the record is complete.

z5os.write wrote 0 bytes before the record was completeN)Ú
memoryviewÚosÚwriteÚOSErrorr   )r   r   Ú	remainingÚwrittens   &&  r   Ú	write_allr      sD   € ô ˜4Ó €Iß
Ü—x’x Ó.Ð.ˆG°1Ô4Üœ#ÐVÓWÐWØ˜hÐ'Š	ñ r   c               ó    € V ^8„  d   QhRRRR/# )r
   ÚfilenameÚstrr   r   r   )r   s   "r   r   r   !   s   € ÷ %Dñ %D¨ð %D°ñ %Dr   c                ól  €  \         P                  ! V 4      pTP                  \        P
                  ,          '       gu   \         P                  ! T \         P                  \         P                  \         P                  9   R7      '       g)    \         P                  ! T 4       \        \        RT 4      h\        P                  ! TP                  4      '       d8   \        P                  R8X  d   \        \        RT 4      h\        \         RT 4      hR#   \         d     R# i ; i  \         d     R# i ; i)a  
Raise an exception if attempting to open the file for writing would fail.

Separates files that can never be written from files that are writable but currently locked.

:param filename: file to check

:raises OSError: as if the file was opened for writing.

N)Úeffective_idszPermission deniedÚwin32zIs a directory)r   Úlstatr   Úst_modeÚstatÚS_IWUSRÚaccessÚW_OKÚsupports_effective_idsÚFileNotFoundErrorÚPermissionErrorr   ÚS_ISDIRÚsysÚplatformÚIsADirectoryErrorr   )r   Ú	file_stats   & r   Úraise_on_not_writable_filer2   !   sè   € ðô
 —H’H˜XÓ&ˆ	ð ×Ñ¤§¡×,Ô,´b·i²iØ”"—'‘'¬¯©´b×6OÑ6OÑ)O÷7ó 7ð	Ü�HŠH�XÔô œfÐ&9¸8ÓDÐDä‡|‚|�I×%Ñ%×&Ò&Ü�<‰<˜7Ô"Ü!¤&Ð*=¸xÓHÐHÜ¤Ð(8¸(ÓCÐCñ 'øô# ô Úðûô !ô 	âð	ús#   ‚D ÂD$ ÄD!Ä D!Ä$D3Ä2D3c               ó    € V ^8„  d   QhRRRR/# )r
   r   z
Path | strr   r   r   )r   s   "r   r   r   I   s   € ÷ =ñ = jð =°Tñ =r   c                óR   € \        V 4      P                  P                  RRR7       R# )zd
Ensure the directory containing the file exists (create it if necessary).

:param filename: file.

T)ÚparentsÚexist_okN)r   ÚparentÚmkdir)r   s   &r   Úensure_directory_existsr9   I   s!   € ô 	ˆƒN×Ñ×Ñ¨°tÐÖ<r   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r
   Ú	lock_filer    Úmtime_beforeÚfloatÚ
ino_beforer   r   r   r   )r   s   "r   r   r   S   s(   € ÷ #ñ #˜sð #°%ð #ÀSð #ÈTñ #r   c                óh  € V  R\         P                  ! 4        R\        P                  ! ^4       2p\	        V 4      P                  V4        \         P                  ! V4      pTP                  T8”  g   TP                  T8w  d   R# \	        T4      P                  4        R#   \         d     R# i ; i)añ  
Atomically break a stale lock file judged stale at modification time *mtime_before*.

Rename the file to a process-private name before unlinking it, so two processes breaking the same lock cannot
delete each other's work: only one rename of a given inode wins, the loser gets ``OSError``. After the rename,
re-check the file. A newer modification time, or a different inode than *ino_before*, means a peer recreated the
lock between the stale decision and the rename, so we grabbed a live file and abort, leaving the renamed file in
place. A rollback rename is itself racy, the same trade-off as the soft read/write marker break. The inode check
matters because filesystems with coarse modification-time granularity (NFS, FAT) can give a same-second recreation
the old mtime, so mtime alone would miss it and unlink a live lock; the inode is the reliable identity, mirroring
the token re-check in the soft read/write marker break. ``lstat`` avoids following a hostile symlink swapped in
after the decision.

The break name carries a random token so it is unguessable and unique per attempt. Without it two breakers in the
same process share ``<lock>.break.<pid>``, and a second break can rename a recreated live lock onto that path in
the window between the re-verify ``lstat`` above and the ``unlink`` below, deleting a live lock the inode check
just approved. A private name keeps anyone else from targeting our break path, matching the soft read/write marker
break.

:param lock_file: path to the lock file to break.
:param mtime_before: modification time observed when the lock was judged stale.
:param ino_before: inode number observed when the lock was judged stale.

:raises OSError: if the rename fails (e.g. the file vanished or is not owned in a sticky directory).

z.break.Ú.N)r   ÚgetpidÚsecretsÚ	token_hexr   Úrenamer$   r   Úst_mtimeÚst_inoÚunlink)r;   r<   r>   Ú
break_pathÚst_afters   &&&  r   Úbreak_lock_filerJ   S   s”   € ð6 �;˜g¤b§i¢i£k ]°!´G×4EÒ4EÀbÓ4IÐ3JÐK€JÜˆƒO×Ñ˜:Ô&ðÜ—8’8˜JÓ'ˆð ×Ñ˜<Ô'¨8¯?©?¸jÔ+HÙÜˆÓ×ÑÖøô	 ô Úðús   ÁB" Â"B1Â0B1r   c               ó$   € V ^8„  d   QhRRRRRR/# )r
   Únamer    r   z
int | Noner   r   r   )r   s   "r   r   r   y   s&   € ÷ Gñ G�ð G˜Jð G°$ñ Gr   c               óœ   € Ve&   \         '       d   \        P                  ! VR 4       R # \        P                  ! V R \        '       * R7       R # )N)Úfollow_symlinks)Ú_SUPPORTS_UTIME_FDr   ÚutimeÚ_SUPPORTS_UTIME_NOFOLLOW)rL   r   s   &$r   ÚtouchrR   y   s4   € ð
 
‚~×,Ó,Ü
�Š��TÔÙÜ‡H‚HˆT�4Ô-EÔ)E×Fr   r#   zFinal[bool]rO   rQ   )rJ   r9   r2   rR   r   )Ú__conditional_annotations__Ú
__future__r   r   rB   r&   r.   Úerrnor   r   r   Úpathlibr   Útypingr   r   r2   r9   rJ   rR   r/   rP   Úsupports_fdrO   Ú__annotations__Úsupports_follow_symlinksrQ   Ú__all__)rS   s   @r   Ú<module>r\      s•   øðß "Ð "ã 	Û Û Û 
ß %Ñ %Ý Ý õ(õ*%DõP=õ#ðLG¨÷ Gð #&§,¡,°'Ñ"9×"XÐ"X¸b¿h¹hÈ"Ï.É.Ñ>XÐ �KÓ Xà(*¯©°B×4OÑ4OÑ(OÐ ˜+Ó Oò‚r   