HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/cloudlinux/venv/lib/python3.11/site-packages/filelock/__pycache__/_util.cpython-311.opt-1.pyc
�

�h���^�ddlmZddlZddlZddlZddlmZmZddlm	Z	dd	�Z
dd�Zdd
gZdS)�)�annotationsN)�EACCES�EISDIR)�Path�filename�str�return�Nonec�l�	tj|��}n#t$rYdSwxYw|jdkr|jtjzst
td|���tj|j��r>tj
dkrt
td|���ttd|���dSdS)a/
    Raise an exception if attempting to open the file for writing would fail.
    This is done so files that will never be writable can be separated from
    files that are writable but currently locked
    :param filename: file to check
    :raises OSError: as if the file was opened for writing.
    NrzPermission denied�win32zIs a directory)
�os�stat�OSError�st_mtime�st_mode�S_IWUSR�PermissionErrorr�S_ISDIR�sys�platform�IsADirectoryErrorr)r�	file_stats  �C/opt/cloudlinux/venv/lib/python3.11/site-packages/filelock/_util.py�raise_on_not_writable_filer
s�����G�H�%�%�	�	���������������Q����!�D�L�0�	I�!�&�*=�x�H�H�H��<�	�)�*�*�	L��|�w�&�&�%�f�.A�8�L�L�L�(��0@�(�K�K�K���	L�	Ls��
%�%�
Path | strc�X�t|��j�dd���dS)zm
    Ensure the directory containing the file exists (create it if necessary)
    :param filename: file.
    T)�parents�exist_okN)r�parent�mkdir)rs r�ensure_directory_existsr!$s,��
	��N�N�����t��<�<�<�<�<�rr!)rrr	r
)rrr	r
)
�
__future__rr
rr�errnorr�pathlibrrr!�__all__�r"r�<module>r(s���"�"�"�"�"�"�	�	�	�	�����
�
�
�
� � � � � � � � �������L�L�L�L�4=�=�=�=�!�����r"