Uname : Linux premium36.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Soft : LiteSpeed
Ip : 198.54.115.237
Port : 443
~
/
opt
/
hc_python
/
lib64
/
python3.12
/
site-packages
/
filelock
/
__pycache__
[ HOME ]
Exec
Submit
_util.cpython-312.pyc
� ���g� � �\ � d dl mZ d dlZd dlZd dlZd dlmZmZ d dlm Z d d�Z d d�ZddgZy)� )�annotationsN)�EACCES�EISDIR)�Pathc �r � t j | � }|j dk7 r�|j t j z st t d| � �t j |j � r5t j dk( rt t d| � �t t d| � �yy# t $ r Y yw xY w)a3 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. Nr zPermission denied�win32zIs a directory) �os�stat�OSError�st_mtime�st_mode�S_IWUSR�PermissionErrorr �S_ISDIR�sys�platform�IsADirectoryErrorr )�filename� file_stats �=/opt/hc_python/lib/python3.12/site-packages/filelock/_util.py�raise_on_not_writable_filer s� � ���G�G�H�%� � ���Q���!�!�D�L�L�0�!�&�*=�x�H�H��<�<� �)�)�*��|�|�w�&�%�f�.A�8�L�L� (��0@�(�K�K� +� �� � ���s �B* �* B6�5B6c �P � t | � j j dd�� y)zp Ensure the directory containing the file exists (create it if necessary). :param filename: file. T)�parents�exist_okN)r �parent�mkdir)r s r �ensure_directory_existsr '