HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/lib/python3.10/site-packages/filelock/__pycache__/_soft.cpython-310.pyc
o

!we��@szddlmZddlZddlZddlmZddlmZmZddl	m
Z
ddlmZddl
mZmZGd	d
�d
e�Zd
gZdS)�)�annotationsN)�suppress)�EACCES�EEXIST)�Path�)�BaseFileLock)�ensure_directory_exists�raise_on_not_writable_filec@s$eZdZdZd	dd�Zd	dd�ZdS)
�SoftFileLockz.Simply watches the existence of the lock file.�return�Nonec
Cs�t|j�t|j�tjtjBtjBtjB}zt�|j||j	j
�}Wn*tyL}z|jt
ks:|jtkr9tjdksA�WYd}~dSWYd}~dSd}~ww||j	_dS)N�win32)r
�	lock_filer	�os�O_WRONLY�O_CREAT�O_EXCL�O_TRUNC�open�_context�mode�OSError�errnorr�sys�platform�lock_file_fd)�self�flags�file_handler�	exception�r!�G/home/arjun/projects/env/lib/python3.10/site-packages/filelock/_soft.py�_acquires*

����
���zSoftFileLock._acquirecCsb|jjdusJ�t�|jj�d|j_tt��t|j���Wd�dS1s*wYdS)N)	rrr�closerrrr�unlink)rr!r!r"�_release%s
"�zSoftFileLock._releaseN)rr
)�__name__�
__module__�__qualname__�__doc__r#r&r!r!r!r"r
s
r)�
__future__rrr�
contextlibrrrr�pathlibr�_apir�_utilr	r
r�__all__r!r!r!r"�<module>s!�