Your IP : 3.139.87.151


Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/filelock/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/filelock/__pycache__/_unix.cpython-311.pyc

�

��bgm����ddlmZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
d	Zejd
krGd�de��Zn!	ddlZd
Zn#e$rYnwxYwGd�de��ZddgZdS)�)�annotationsN)�suppress)�ENOSYS)�cast�)�BaseFileLock)�ensure_directory_existsF�win32c�"�eZdZdZdd�Zdd�ZdS)�UnixFileLock�HUses the :func:`fcntl.flock` to hard lock the lock file on unix systems.�return�Nonec��t��N��NotImplementedError��selfs �_/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/filelock/_unix.py�_acquirezUnixFileLock._acquire���%�%�c��t�rrrs r�_releasezUnixFileLock._releaserrN�rr��__name__�
__module__�__qualname__�__doc__rr�rrrrsB������V�V�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&rrTc�"�eZdZdZdd�Zdd�ZdS)rr
rrc�h�t|j��tjtjztjz}tj|j||jj��}tt��5tj||jj��ddd��n#1swxYwY	tj
|tjtjz��||j_dS#t"$rA}tj|��|jt(krd}t+|��|�Yd}~dSd}~wwxYw)NzFFileSystem does not appear to support flock; user SoftFileLock instead)r	�	lock_file�os�O_RDWR�O_CREAT�O_TRUNC�open�_context�moder�PermissionError�fchmod�fcntl�flock�LOCK_EX�LOCK_NB�lock_file_fd�OSError�close�errnorr)r�
open_flags�fd�	exception�msgs     rrzUnixFileLock._acquire$sU��#�D�N�3�3�3���R�Z�/�"�*�<�J������T�]�5G�H�H�B��/�*�*�
2�
2��	�"�d�m�0�1�1�1�
2�
2�
2�
2�
2�
2�
2�
2�
2�
2�
2����
2�
2�
2�
2�
0���B��
��
� =�>�>�>�.0��
�*�*�*��
�
B�
B�
B��������?�f�,�,�b�C�-�c�2�2�	�A�-�,�,�,�,�,�����
B���s*�4 B � B$�'B$�,,C&�&
D1�06D,�,D1c���tt|jj��}d|j_t	j|tj��tj|��dSr)	r�intr+r3r/r0�LOCK_UNr&r5)rr8s  rrzUnixFileLock._release4sG���c�4�=�5�6�6�B�)-�D�M�&��K��E�M�*�*�*��H�R�L�L�L�L�LrNrrr"rrrr!sB������V�V�	0�	0�	0�	0� 	�	�	�	�	�	r�	has_fcntl)�
__future__rr&�sys�
contextlibrr6r�typingr�_apir�_utilr	r>�platformrr/�ImportError�__all__r"rr�<module>rHs<��"�"�"�"�"�"�	�	�	�	�
�
�
�
�������������������������*�*�*�*�*�*�
�	��<�7���&�&�&�&�&�|�&�&�&�&�������	�	���
�
�
���
����
�����|����<�����s�
A�A�A

?>