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: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //proc/self/root/usr/local/lib/python3.10/dist-packages/filelock/__pycache__/_unix.cpython-310.pyc
o

j�h/	�	@s�ddlmZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
dd	lmZd
ZejdkrBGdd
�d
e
�Zn&zddlZejejejejfZWneefy]YnwdZGdd
�d
e
�Zd
dgZdS)�)�annotationsN)�suppress)�ENOSYS)�Path)�cast�)�BaseFileLock)�ensure_directory_existsF�win32c@�$eZdZdZd	dd�Zd	dd�ZdS)
�UnixFileLock�HUses the :func:`fcntl.flock` to hard lock the lock file on unix systems.�return�NonecC�t��N��NotImplementedError��self�r�9/usr/local/lib/python3.10/dist-packages/filelock/_unix.py�_acquire��UnixFileLock._acquirecCrrrrrrr�_releaser�UnixFileLock._releaseN�rr��__name__�
__module__�__qualname__�__doc__rrrrrrrs
rTc@r)
rr
rrc
Cs�t|j�tjtjB}t|j���s|tjO}t�|j||j	j
�}tt��t�
||j	j
�Wd�n1s8wYzt�|tjtjB�Wn$tym}zt�|�|jtkrbd}t|�|�WYd}~dSd}~ww||j	_dS)NzEFileSystem does not appear to support flock; use SoftFileLock instead)r	�	lock_file�os�O_RDWR�O_TRUNCr�exists�O_CREAT�open�_context�moder�PermissionError�fchmod�fcntl�flock�LOCK_EX�LOCK_NB�OSError�close�errnorr�lock_file_fd)r�
open_flags�fd�	exception�msgrrrr's&


�


���rcCs2td|jj�}d|j_t�|tj�t�|�dS)N�int)rr*r5r.r/�LOCK_UNr$r3)rr7rrrr9srNrrrrrrr$s
�	has_fcntl)�
__future__rr$�sys�
contextlibrr4r�pathlibr�typingr�_apir�_utilr	r<�platformrr.r/r0r1r;�_�ImportError�AttributeError�__all__rrrr�<module>s.

� �