
    .Ph                        d dl mZ d dlZd dlZd dlmZ d dlmZmZ d dl	m
Z
 ddlmZ ddlmZmZ  G d	 d
e          Zd
gZdS )    )annotationsN)suppress)EACCESEEXIST)Path   )BaseFileLock)ensure_directory_existsraise_on_not_writable_filec                  "    e Zd ZdZddZddZdS )SoftFileLockz.Simply watches the existence of the lock file.returnNonec                   t          | j                   t          | j                   t          j        t          j        z  t          j        z  t          j        z  }	 t          j        | j        || j	        j
                  }|| j	        _        d S # t          $ rB}|j        t          k    s!|j        t          k    rt           j        dk    s Y d }~d S Y d }~d S d }~ww xY w)Nwin32)r   	lock_filer
   osO_WRONLYO_CREATO_EXCLO_TRUNCopen_contextmodelock_file_fdOSErrorerrnor   r   sysplatform)selfflagsfile_handler	exceptions       N/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/filelock/_soft.py_acquirezSoftFileLock._acquire   s    "4>222/// Kji j 			674>5$-:LMML *6DM&&&  	 	 	6))Ov--#,'2I2I *)))))2I2I2I2I2I2I	s   %B 
C1CCc                   | j         j        J t          j        | j         j                   d | j         _        t	          t
                    5  t          | j                                                   d d d            d S # 1 swxY w Y   d S )N)	r   r   r   closer   r   r   r   unlink)r    s    r$   _releasezSoftFileLock._release%   s    })555
+,,,%)"g 	* 	*  '')))	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	*s   'BBBN)r   r   )__name__
__module____qualname____doc__r%   r)        r$   r   r      sB        886 6 6 6** * * * * *r/   r   )
__future__r   r   r   
contextlibr   r   r   r   pathlibr   _apir	   _utilr
   r   r   __all__r.   r/   r$   <module>r6      s    " " " " " " 				 



                                   F F F F F F F F* * * * *< * * *B r/   