HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/filelock/__pycache__/_windows.cpython-310.pyc
o

j�h��@s�ddlmZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
dd	lmZmZejd
krFddlZGdd�de
�ZnGd
d�de
�ZdgZdS)�)�annotationsN)�suppress)�EACCES)�Path)�cast�)�BaseFileLock)�ensure_directory_exists�raise_on_not_writable_file�win32c@�$eZdZdZd	dd�Zd	dd�ZdS)
�WindowsFileLock�WUses the :func:`msvcrt.locking` function to hard lock the lock file on Windows systems.�return�Nonec
Cs�t|j�t|j�tjtjBtjB}zt�|j||jj	�}Wnt
y8}z
|jtkr-�WYd}~dSd}~wwz
t
�|t
jd�Wnt
ya}zt�|�|jtkrV�WYd}~dSd}~ww||j_dS)Nr)r
�	lock_filer	�os�O_RDWR�O_CREAT�O_TRUNC�open�_context�mode�OSError�errnor�msvcrt�locking�LK_NBLCK�close�lock_file_fd)�self�flags�fd�	exception�r$�</usr/local/lib/python3.10/dist-packages/filelock/_windows.py�_acquires4

���
���

����WindowsFileLock._acquirecCsltd|jj�}d|j_t�|tjd�t�|�tt	��t
|j���Wd�dS1s/wYdS)N�intr)
rrrrr�LK_UNLCKrrrrrr�unlink)r r"r$r$r%�_release*s

"��WindowsFileLock._releaseN�rr��__name__�
__module__�__qualname__�__doc__r&r+r$r$r$r%r
s
r
c@r)
r
rrrcC�t��N��NotImplementedError�r r$r$r%r&8�r'cCr3r4r5r7r$r$r%r+;r8r,Nr-r.r$r$r$r%r
5s
)�
__future__rr�sys�
contextlibrrr�pathlibr�typingr�_apir�_utilr	r
�platformrr
�__all__r$r$r$r%�<module>s
%�